Github user MLnick commented on a diff in the pull request:

    https://github.com/apache/spark/pull/11186#discussion_r53283890
  
    --- 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 --
    
    While we're at it, I don't like the `(recommended: 0.01)` in the comment 
for `lambda`. This is the default for the method call without specifying 
`lambda`, but I certainly don't think this is the **recommended** 
regularization. Lambda can vary widely depending on the dataset 
characteristics, and should be selected in the usual manner (e.g. through 
cross-validation).


---
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]

Reply via email to