Github user MLnick commented on a diff in the pull request:
https://github.com/apache/spark/pull/11186#discussion_r52977115
--- Diff: python/pyspark/mllib/recommendation.py ---
@@ -234,11 +238,35 @@ def _prepare(cls, ratings):
def train(cls, ratings, rank, iterations=5, lambda_=0.01, blocks=-1,
nonnegative=False,
seed=None):
"""
- Train a matrix factorization model given an RDD of ratings given
by users to some products,
- in the form of (userID, productID, rating) pairs. We approximate
the ratings matrix as the
- product of two lower-rank matrices of a given rank (number of
features). To solve for these
- features, we run a given number of iterations of ALS. This is done
using a level of
- parallelism given by `blocks`.
+ Train a matrix factorization model given an RDD of ratings given by
+ users to some products, in the form of (userID, productID, rating)
+ pairs. We approximate the ratings matrix as the product of two
+ lower-rank matrices of a given rank (number of features). To solve
+ for these features, we run a given number of iterations of ALS.
This
+ is done using a level of parallelism given by `blocks`.
+
+ :param ratings:
+ RDD of `Rating` or (userID, productID, rating) tuple.
+ :param rank:
+ Rank of the feature matrices computed (number of features).
+ :param iterations:
+ Number of iterations run for each batch of data.
--- End diff --
This is a little unclear - what is meant by "for each batch of data"?
Perhaps this should simply be `Number of ALS iterations to run`?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]