Github user mengxr commented on the pull request:
https://github.com/apache/spark/pull/88#issuecomment-37790090
@rezazadeh U, Sigma, and V are all stored in DenseMatrix format in the
DenseMatrixSVD class. For tall-and-skinny PCA/SVD, U should use RDD for
storage. However, Sigma and V are small. Sigma is just a double array of size
k, while V is of size k x n. I don't think we should force DenseMatrix type for
Sigma and V here. Maybe we can make SVD return types generic, e.g., SVD[UT,
VT]. For the tall and skinny case, UT is RDD[Vector] while VT is
Array[Array[Double]]. We always use Array[Double] for Sigma.
Besides, I think we should mention tall and skinny clearly in the class
names, e.g., TallAndSkinnySVD and TallAndSkinnyPCA.
---
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.
---