Skip to content

Commit 983d6a9

Browse files
rezazadehmengxr
authored andcommitted
[MLlib] Update SVD documentation in IndexedRowMatrix
Updating this to reflect the newest SVD via ARPACK Author: Reza Zadeh <[email protected]> Closes #2389 from rezazadeh/irmdocs and squashes the following commits: 7fa1313 [Reza Zadeh] Update svd docs 715da25 [Reza Zadeh] Updated computeSVD documentation IndexedRowMatrix
1 parent 3b93128 commit 983d6a9

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

mllib/src/main/scala/org/apache/spark/mllib/linalg/distributed/IndexedRowMatrix.scala

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -76,16 +76,12 @@ class IndexedRowMatrix(
7676
}
7777

7878
/**
79-
* Computes the singular value decomposition of this matrix.
79+
* Computes the singular value decomposition of this IndexedRowMatrix.
8080
* Denote this matrix by A (m x n), this will compute matrices U, S, V such that A = U * S * V'.
8181
*
82-
* There is no restriction on m, but we require `n^2` doubles to fit in memory.
83-
* Further, n should be less than m.
84-
85-
* The decomposition is computed by first computing A'A = V S^2 V',
86-
* computing svd locally on that (since n x n is small), from which we recover S and V.
87-
* Then we compute U via easy matrix multiplication as U = A * (V * S^-1).
88-
* Note that this approach requires `O(n^3)` time on the master node.
82+
* The cost and implementation of this method is identical to that in
83+
* [[org.apache.spark.mllib.linalg.distributed.RowMatrix]]
84+
* With the addition of indices.
8985
*
9086
* At most k largest non-zero singular values and associated vectors are returned.
9187
* If there are k such values, then the dimensions of the return will be:

0 commit comments

Comments
 (0)