srowen commented on a change in pull request #32734:
URL: https://github.com/apache/spark/pull/32734#discussion_r645084925
##########
File path:
mllib/src/main/scala/org/apache/spark/mllib/linalg/distributed/RowMatrix.scala
##########
@@ -421,6 +421,11 @@ class RowMatrix @Since("1.0.0") (
}
}
+ // The matrix is sparse, if all the rows has sparsity more than 0.5.
+ private def isSparseMatrix: Boolean = {
+ rows.filter(row => row.sparsity() < 0.5).isEmpty()
Review comment:
I think this could be fine but why 0.5? do we not still have similar
problems for less-sparse sparse input? I feel like this isn't fixing the
underlying problem - does anyone know why PCA is giving different results for
sparse input?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]