Skip to content

Commit

Permalink
locks random state in train test split (#51)
Browse files Browse the repository at this point in the history
  • Loading branch information
justin-cechmanek authored Dec 10, 2024
1 parent d4ba5f6 commit 766be36
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@
],
"source": [
"# split the data into training and testing sets (80% train, 20% test)\n",
"train_set, test_set = train_test_split(ratings_data, test_size=0.2)\n",
"train_set, test_set = train_test_split(ratings_data, test_size=0.2, random_state=42)\n",
"\n",
"# use SVD (Singular Value Decomposition) for collaborative filtering\n",
"svd = SVD(n_factors=100, biased=False) # we'll set biased to False so that predictions are of the form \"rating_prediction = user_vector dot item_vector\"\n",
Expand Down

0 comments on commit 766be36

Please sign in to comment.