From 4cee53c18ed0c1c3e77c1101054044adf3250caa Mon Sep 17 00:00:00 2001 From: Viveka Kulharia Date: Tue, 17 Nov 2015 20:47:12 +0530 Subject: [PATCH] rmse was wrongly calculated It was multiplying with U instaed of dividing by U --- examples/src/main/python/als.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/src/main/python/als.py b/examples/src/main/python/als.py index 1c3a787bd0e94..205ca02962bee 100755 --- a/examples/src/main/python/als.py +++ b/examples/src/main/python/als.py @@ -36,7 +36,7 @@ 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):