Last active
January 18, 2019 01:45
-
-
Save jfkirk/91c80fec2fa66cd8f920971ff4dde4e6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Shuffle the ratings and split them in to train/test sets 80%/20% | |
random.shuffle(raw_ratings) # Shuffles the list in-place | |
cutoff = int(.8 * len(raw_ratings)) | |
train_ratings = raw_ratings[:cutoff] | |
test_ratings = raw_ratings[cutoff:] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment