aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rwxr-xr-xexamples/src/main/python/als.py2
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):