Skip to content

Instantly share code, notes, and snippets.

@MemphisMeng
Last active August 12, 2020 16:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MemphisMeng/7b84cefea277a76200bfa8e0248e74b0 to your computer and use it in GitHub Desktop.
Save MemphisMeng/7b84cefea277a76200bfa8e0248e74b0 to your computer and use it in GitHub Desktop.
algo = SVD()
trainset = data.build_full_trainset()
algo.fit(trainset)
# Than predict ratings for all pairs (u, i) that are NOT in the training set.
testset = trainset.build_anti_testset()
predictions = algo.test(testset)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment