diff options
author | Viveka Kulharia <vivkul@iitk.ac.in> | 2015-11-18 09:10:15 +0000 |
---|---|---|
committer | Sean Owen <sowen@cloudera.com> | 2015-11-18 09:10:15 +0000 |
commit | 1429e0a2b562469146b6fa06051c85a00092e5b8 (patch) | |
tree | a1c0cfa6149d87d255353c343155f6fa79aff7bf /examples/src/main/python/als.py | |
parent | 9631ca35275b0ce8a5219f975907ac36ed11f528 (diff) | |
download | spark-1429e0a2b562469146b6fa06051c85a00092e5b8.tar.gz spark-1429e0a2b562469146b6fa06051c85a00092e5b8.tar.bz2 spark-1429e0a2b562469146b6fa06051c85a00092e5b8.zip |
rmse was wrongly calculated
It was multiplying with U instaed of dividing by U
Author: Viveka Kulharia <vivkul@iitk.ac.in>
Closes #9771 from vivkul/patch-1.
Diffstat (limited to 'examples/src/main/python/als.py')
-rwxr-xr-x | examples/src/main/python/als.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/src/main/python/als.py b/examples/src/main/python/als.py index 1c3a787bd0..205ca02962 100755 --- a/examples/src/main/python/als.py +++ b/examples/src/main/python/als.py @@ -36,7 +36,7 @@ np.random.seed(42) def rmse(R, ms, us): diff = R - ms * us.T - return np.sqrt(np.sum(np.power(diff, 2)) / M * U) + return np.sqrt(np.sum(np.power(diff, 2)) / (M * U)) def update(i, vec, mat, ratings): |