Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from surprise import SVD
- from surprise import Dataset
- from surprise.model_selection import cross_validate
- # Load the movielens-100k dataset
- data = Dataset.load_builtin('ml-100k')
- # Use the famous SVD algorithm
- algo = SVD()
- # Run 5-fold cross-validation and print results
- cross_validate(algo, data, measures=['RMSE', 'MAE'], cv=5, verbose=True)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement