Skip to content

Commit 40fd933

Browse files
authored
Merge pull request #9 from mmaorc/fix-movie-average-calculation-example
Fix 'Toy Story' movie average calculation bug in Ex8
2 parents f531bf2 + 07bf4dd commit 40fd933

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Exercise8/exercise8.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,7 @@
468468
"\n",
469469
"# From the matrix, we can compute statistics like average rating.\n",
470470
"print('Average rating for movie 1 (Toy Story): %f / 5' %\n",
471-
" np.mean(Y[0, R[0, :]]))\n",
471+
" np.mean(Y[0, R[0, :] == 1]))\n",
472472
"\n",
473473
"# We can \"visualize\" the ratings matrix by plotting it with imshow\n",
474474
"pyplot.figure(figsize=(8, 8))\n",

0 commit comments

Comments
 (0)