Skip to content

Commit beee4ef

Browse files
committed
BUG Fix computation of RMSE
1 parent d7fef6f commit beee4ef

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ch08/similar_movie.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,5 +70,5 @@ def all_estimates(reviews, k=1):
7070
error = (estimates - reviews)
7171
error **= 2
7272
error = error[reviews > 0]
73-
rmse = np.sqrt(error).mean()
73+
rmse = np.sqrt(error.mean())
7474
print("RMSE is {0}.".format(rmse))

0 commit comments

Comments
 (0)