Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions python/pyspark/mllib/recommendation.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,18 @@ def predictAll(self, usersProducts):

class ALS(object):

"""Alternating Least Squares matrix factorization.

SPARK-3990: In Spark 1.1.x, we use Kryo serialization by default in
PySpark. ALS does not work under this default setting. You can switch
back to the default Java serialization by setting:

spark.serializer=org.apache.spark.serializer.JavaSerializer

Please go to http://spark.apache.org/docs/latest/configuration.html
for instructions on how to configure Spark.
"""

@classmethod
def train(cls, ratings, rank, iterations=5, lambda_=0.01, blocks=-1):
sc = ratings.context
Expand Down