Skip to content

Commit e48a6e4

Browse files
committed
make latent svd computation constraint clear
1 parent 9a151ce commit e48a6e4

File tree

1 file changed

+2
-0
lines changed
  • mllib/src/main/scala/org/apache/spark/mllib/linalg/distributed

1 file changed

+2
-0
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,8 @@ class RowMatrix(
246246
val G = computeGramianMatrix().toBreeze.asInstanceOf[BDM[Double]]
247247
EigenValueDecomposition.symmetricEigs(v => G * v, n, k, tol, maxIter)
248248
case SVDMode.LocalLAPACK =>
249+
//breeze (v0.10) svd latent constraint, 7 * n * n + 4 * n < Int.MaxValue
250+
require(n < 17515, s"$n exceeds the breeze svd capability")
249251
val G = computeGramianMatrix().toBreeze.asInstanceOf[BDM[Double]]
250252
val brzSvd.SVD(uFull: BDM[Double], sigmaSquaresFull: BDV[Double], _) = brzSvd(G)
251253
(sigmaSquaresFull, uFull)

0 commit comments

Comments
 (0)