diff options
author | Xiangrui Meng <meng@databricks.com> | 2014-11-10 22:39:09 -0800 |
---|---|---|
committer | Xiangrui Meng <meng@databricks.com> | 2014-11-10 22:39:09 -0800 |
commit | b2cb357d7d5bdbdaa00db2b56d7a2651caece93f (patch) | |
tree | a4e3baddf80bf239f9fc1e015120c45bfe5b9df1 | |
parent | 11798d00f586d0edfaac1e8f35273679c3012a9d (diff) | |
download | spark-b2cb357d7d5bdbdaa00db2b56d7a2651caece93f.tar.gz spark-b2cb357d7d5bdbdaa00db2b56d7a2651caece93f.tar.bz2 spark-b2cb357d7d5bdbdaa00db2b56d7a2651caece93f.zip |
[branch-1.1][SPARK-3990] add a note on ALS usage
Because we switched back to Kryo in #3187 , we need to leave a note about the workaround.
Author: Xiangrui Meng <meng@databricks.com>
Closes #3190 from mengxr/SPARK-3990-1.1 and squashes the following commits:
d4818f3 [Xiangrui Meng] fix python style
53725b0 [Xiangrui Meng] add a note about SPARK-3990
56ad70e [Xiangrui Meng] add a note about SPARK-3990
-rw-r--r-- | python/pyspark/mllib/recommendation.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/python/pyspark/mllib/recommendation.py b/python/pyspark/mllib/recommendation.py index e863fc249e..d4c06c0566 100644 --- a/python/pyspark/mllib/recommendation.py +++ b/python/pyspark/mllib/recommendation.py @@ -60,6 +60,18 @@ class MatrixFactorizationModel(object): 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 |