You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Downloading data from https://files.grouplens.org/datasets/movielens/ml-1m.zip
152
-
5917549/5917549 ━━━━━━━━━━━━━━━━━━━━ 0s 0us/step
153
151
154
-
/var/tmp/ipykernel_688439/1372663084.py:26: ParserWarning: Falling back to the 'python' engine because the 'c' engine does not support regex separators (separators > 1 char and different from '\s+' are interpreted as regex); you can avoid this warning by specifying engine='python'.
152
+
5917549/5917549 ━━━━━━━━━━━━━━━━━━━━ 2s 0us/step
153
+
154
+
<ipython-input-4-6fc962858754>:26: ParserWarning: Falling back to the 'python' engine because the 'c' engine does not support regex separators (separators > 1 char and different from '\s+' are interpreted as regex); you can avoid this warning by specifying engine='python'.
155
155
ratings_df = pd.read_csv(
156
-
/var/tmp/ipykernel_688439/1372663084.py:38: ParserWarning: Falling back to the 'python' engine because the 'c' engine does not support regex separators (separators > 1 char and different from '\s+' are interpreted as regex); you can avoid this warning by specifying engine='python'.
156
+
157
+
<ipython-input-4-6fc962858754>:38: ParserWarning: Falling back to the 'python' engine because the 'c' engine does not support regex separators (separators > 1 char and different from '\s+' are interpreted as regex); you can avoid this warning by specifying engine='python'.
157
158
movies_df = pd.read_csv(
158
159
```
159
160
</div>
@@ -199,6 +200,12 @@ with training the model:
199
200
movies.
200
201
4. Pad all sequences to `MAX_CONTEXT_LENGTH`.
201
202
203
+
An important point to note is how we form the train-test splits. We do not
204
+
form the entire dataset of sequences and then split it into train and test.
205
+
Instead, for every user, we take the last sequence to be part of the test set,
206
+
and all other sequences to be part of the train set. This is to prevent data
<keras.src.callbacks.history.History at 0x795792c69b90>
446
465
```
447
466
</div>
448
467
@@ -487,22 +506,23 @@ for movie_id in predictions[0]:
487
506
<divclass="k-default-codeblock">
488
507
```
489
508
==> Movies the user has watched:
490
-
Rob Roy (1995), Legends of the Fall (1994), French Kiss (1995), Terminator 2: Judgment Day (1991), Nikita (La Femme Nikita) (1990), Professional, The (a.k.a. Leon: The Professional) (1994), Seven (Se7en) (1995), Fugitive, The (1993), Enemy of the State (1998), Reservoir Dogs (1992)
491
-
1/1 ━━━━━━━━━━━━━━━━━━━━ 0s 225ms/step
509
+
Beauty and the Beast (1991), Tarzan (1999), Close Shave, A (1995), Aladdin (1992), Toy Story (1995), Bug's Life, A (1998), Antz (1998), Hunchback of Notre Dame, The (1996), Hercules (1997), Mulan (1998)
510
+
511
+
1/1 ━━━━━━━━━━━━━━━━━━━━ 0s 272ms/step
492
512
493
513
==> Recommended movies for the above sequence:
494
-
Red Rock West (1992)
495
-
Casino (1995)
496
-
Cape Fear (1991)
497
-
Simple Plan, A (1998)
498
-
Seven (Se7en) (1995)
499
-
Hard 8 (a.k.a. Sydney, a.k.a. Hard Eight) (1996)
500
-
Primal Fear (1996)
501
-
Heat (1995)
502
-
Scream (1996)
503
-
Zero Effect (1998)
504
-
505
-
/opt/conda/envs/keras-jax/lib/python3.10/site-packages/keras/src/trainers/epoch_iterator.py:151: UserWarning: Your input ran out of data; interrupting training. Make sure that your dataset or generator can generate at least `steps_per_epoch * epochs` batches. You may need to use the `.repeat()` function when building your dataset.
514
+
Hunchback of Notre Dame, The (1996)
515
+
Anastasia (1997)
516
+
Beavis and Butt-head Do America (1996)
517
+
Hercules (1997)
518
+
Pocahontas (1995)
519
+
Thumbelina (1994)
520
+
James and the Giant Peach (1996)
521
+
We're Back! A Dinosaur's Story (1993)
522
+
Rescuers Down Under, The (1990)
523
+
Prince of Egypt, The (1998)
524
+
525
+
/usr/local/lib/python3.11/dist-packages/keras/src/trainers/epoch_iterator.py:151: UserWarning: Your input ran out of data; interrupting training. Make sure that your dataset or generator can generate at least `steps_per_epoch * epochs` batches. You may need to use the `.repeat()` function when building your dataset.
0 commit comments