Merge pull request #9 from mmaorc/fix-movie-average-calculation-example

Fix 'Toy Story' movie average calculation bug in Ex8
This commit is contained in:
Gerges Dib
2018-10-08 22:03:20 -04:00
committed by GitHub

View File

@@ -468,7 +468,7 @@
"\n",
"# From the matrix, we can compute statistics like average rating.\n",
"print('Average rating for movie 1 (Toy Story): %f / 5' %\n",
" np.mean(Y[0, R[0, :]]))\n",
" np.mean(Y[0, R[0, :] == 1]))\n",
"\n",
"# We can \"visualize\" the ratings matrix by plotting it with imshow\n",
"pyplot.figure(figsize=(8, 8))\n",