Skip to content

Commit dc655a1

Browse files
committed
relax python tests
1 parent f410df2 commit dc655a1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

python/pyspark/mllib/recommendation.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class MatrixFactorizationModel(JavaModelWrapper, JavaSaveable, JavaLoader):
5252
>>> ratings = sc.parallelize([r1, r2, r3])
5353
>>> model = ALS.trainImplicit(ratings, 1, seed=10)
5454
>>> model.predict(2, 2)
55-
0.43...
55+
0.4...
5656
5757
>>> testset = sc.parallelize([(1, 2), (1, 1)])
5858
>>> model = ALS.train(ratings, 2, seed=0)
@@ -82,14 +82,14 @@ class MatrixFactorizationModel(JavaModelWrapper, JavaSaveable, JavaLoader):
8282
8383
>>> model = ALS.trainImplicit(ratings, 1, nonnegative=True, seed=10)
8484
>>> model.predict(2,2)
85-
0.43...
85+
0.4...
8686
8787
>>> import os, tempfile
8888
>>> path = tempfile.mkdtemp()
8989
>>> model.save(sc, path)
9090
>>> sameModel = MatrixFactorizationModel.load(sc, path)
9191
>>> sameModel.predict(2,2)
92-
0.43...
92+
0.4...
9393
>>> sameModel.predictAll(testset).collect()
9494
[Rating(...
9595
>>> try:

0 commit comments

Comments
 (0)