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

    https://github.com/apache/spark/pull/12419#discussion_r61313031
  
    --- Diff: 
mllib/src/main/scala/org/apache/spark/mllib/linalg/distributed/RowMatrix.scala 
---
    @@ -379,15 +379,21 @@ class RowMatrix @Since("1.0.0") (
        *
        * Note that this cannot be computed on matrices with more than 65535 
columns.
        *
    -   * @param k number of top principal components.
    +   * @param filter either the number of top principal components or 
variance
    +   *               retained by the minimal set of principal components.
        * @return a matrix of size n-by-k, whose columns are principal 
components, and
        * a vector of values which indicate how much variance each principal 
component
        * explains
        */
       @Since("1.6.0")
    -  def computePrincipalComponentsAndExplainedVariance(k: Int): (Matrix, 
Vector) = {
    +  def computePrincipalComponentsAndExplainedVariance(filter: Either[Int, 
Double])
    --- End diff --
    
    I'm no expert in the ML domain, but from a user perspective, this breaks 
API backwards compatibility.
    An alternative could be to create a new method and factor out common 
behaviour shared with the current 
`computePrincipalComponentsAndExplainedVariance` into a private utility method.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to