Repository: spark
Updated Branches:
  refs/heads/branch-1.5 0ed6d9cf3 -> 4b8dc2556


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.

(cherry picked from commit 1429e0a2b562469146b6fa06051c85a00092e5b8)
Signed-off-by: Sean Owen <so...@cloudera.com>


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

Branch: refs/heads/branch-1.5
Commit: 4b8dc25562e150e5ebc46b03a105c55de3098a1a
Parents: 0ed6d9c
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:43 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/4b8dc255/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