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

    https://github.com/apache/spark/pull/1687#discussion_r15645443
  
    --- Diff: 
mllib/src/main/scala/org/apache/spark/mllib/recommendation/MatrixFactorizationModel.scala
 ---
    @@ -66,6 +66,42 @@ class MatrixFactorizationModel private[mllib] (
       }
     
       /**
    +   * Recommends products to users.
    +   *
    +   * @param user the user to recommend products to
    +   * @param howMany how many products to return. The number returned may 
be less than this.
    +   * @return product ID and score tuples, sorted descending by score. The 
first product returned
    +   *  is the one predicted to be most strongly recommended to the user. 
The score is an opaque
    +   *  value that indicates how strongly recommended the product is.
    +   */
    +  def recommendProducts(user: Int, howMany: Int = 10): Array[(Int,Double)] 
=
    --- End diff --
    
    The default value is not Java friendly. It should be okay if we don't set a 
default here.
    
    `howMany` -> `num`? This is similar to `RDD.top`, where we used `num` as 
the argument name.
    
    Add a space after `Int,`


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

Reply via email to