Github user BryanCutler commented on a diff in the pull request:
https://github.com/apache/spark/pull/11186#discussion_r53371243
--- Diff:
mllib/src/main/scala/org/apache/spark/mllib/recommendation/ALS.scala ---
@@ -329,13 +327,12 @@ object ALS {
}
/**
- * 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. The level of
parallelism is determined
- * automatically based on the number of partitions in `ratings`.
+ * Train a matrix factorization model given an RDD of ratings by users
for a subset of products.
+ * The ratings matrix is approximated as the product of two lower-rank
matrices of a given rank
+ * (number of features). To solve for these features, ALS is run
iteratively with a level of
+ * parallelism automatically based on the number of partitions in
`ratings`.
*
- * @param ratings RDD of (userID, productID, rating) pairs
+ * @param ratings RDD of [[Rating]] objects with userID, productID,
and rating
* @param rank number of features to use
* @param iterations number of iterations of ALS (recommended: 10-20)
* @param lambda regularization factor (recommended: 0.01)
--- End diff --
Good suggestions, I agree with what you said. Also, the recommendation of
the number of iterations is also a bit strange. I can see putting out a
ballpark number so people don't put a huge number, since it can converge
quickly and take a bit longer relative to other algos. But, the PySpark default
is 5 while in Scala it recommends 10-20. Maybe it would be better to just put
a sentence in the online docs about this and remove the recommendation here?
---
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]