Repository: spark
Updated Branches:
  refs/heads/master 9631ca352 -> 1429e0a2b


rmse was wrongly calculated

It was multiplying with U instaed of dividing by U

Author: Viveka Kulharia <viv...@iitk.ac.in>

Closes #9771 from vivkul/patch-1.


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/1429e0a2
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/1429e0a2
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/1429e0a2

Branch: refs/heads/master
Commit: 1429e0a2b562469146b6fa06051c85a00092e5b8
Parents: 9631ca3
Author: Viveka Kulharia <viv...@iitk.ac.in>
Authored: Wed Nov 18 09:10:15 2015 +0000
Committer: Sean Owen <so...@cloudera.com>
Committed: Wed Nov 18 09:10:15 2015 +0000

----------------------------------------------------------------------
 examples/src/main/python/als.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/1429e0a2/examples/src/main/python/als.py
----------------------------------------------------------------------
diff --git a/examples/src/main/python/als.py b/examples/src/main/python/als.py
index 1c3a787..205ca02 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):


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org
For additional commands, e-mail: commits-h...@spark.apache.org

Reply via email to