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

    https://github.com/apache/spark/pull/964#discussion_r13375801
  
    --- Diff: 
mllib/src/main/scala/org/apache/spark/mllib/linalg/distributed/RowMatrix.scala 
---
    @@ -221,15 +234,20 @@ class RowMatrix(
     
       /**
        * Computes the singular value decomposition of this matrix.
    -   * Denote this matrix by A (m x n), this will compute matrices U, S, V 
such that A = U * S * V'.
    +   * Denote this matrix by A (m x n), this will compute matrices U, S, V 
such that A ~= U * S * V',
    +   * where S contains the leading singular values, U and V contain the 
corresponding singular
    +   * vectors.
        *
    -   * There is no restriction on m, but we require `n^2` doubles to fit in 
memory.
    -   * Further, n should be less than m.
    -
    -   * The decomposition is computed by first computing A'A = V S^2 V',
    -   * computing svd locally on that (since n x n is small), from which we 
recover S and V.
    -   * Then we compute U via easy matrix multiplication as U =  A * (V * 
S^-1).
    -   * Note that this approach requires `O(n^3)` time on the master node.
    +   * There is no restriction on m, but we require `n*(6*k+4)` doubles to 
fit in memory on the master
    +   * node. Further, n should be less than m.
    +   *
    +   * The decomposition is computed by providing a function that multiples 
a vector with A'A to
    +   * ARPACK, and iteratively invoking ARPACK-dsaupd on master node, from 
which we recover S and V.
    +   * Then we compute U via easy matrix multiplication as U =  A * (V * 
S-1).
    --- End diff --
    
    "S-1" -> "S^-1" or "S^{-1}"


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