aboutsummaryrefslogtreecommitdiff
path: root/mllib
diff options
context:
space:
mode:
Diffstat (limited to 'mllib')
-rw-r--r--mllib/src/main/scala/org/apache/spark/mllib/linalg/distributed/RowMatrix.scala11
1 files changed, 8 insertions, 3 deletions
diff --git a/mllib/src/main/scala/org/apache/spark/mllib/linalg/distributed/RowMatrix.scala b/mllib/src/main/scala/org/apache/spark/mllib/linalg/distributed/RowMatrix.scala
index e55ef26858..7c7d900af3 100644
--- a/mllib/src/main/scala/org/apache/spark/mllib/linalg/distributed/RowMatrix.scala
+++ b/mllib/src/main/scala/org/apache/spark/mllib/linalg/distributed/RowMatrix.scala
@@ -109,7 +109,8 @@ class RowMatrix @Since("1.0.0") (
}
/**
- * Computes the Gramian matrix `A^T A`.
+ * Computes the Gramian matrix `A^T A`. Note that this cannot be computed on matrices with
+ * more than 65535 columns.
*/
@Since("1.0.0")
def computeGramianMatrix(): Matrix = {
@@ -150,7 +151,8 @@ class RowMatrix @Since("1.0.0") (
* - s is a Vector of size k, holding the singular values in descending order,
* - V is a Matrix of size n x k that satisfies V' * V = eye(k).
*
- * We assume n is smaller than m. The singular values and the right singular vectors are derived
+ * We assume n is smaller than m, though this is not strictly required.
+ * The singular values and the right singular vectors are derived
* from the eigenvalues and the eigenvectors of the Gramian matrix A' * A. U, the matrix
* storing the right singular vectors, is computed via matrix multiplication as
* U = A * (V * S^-1^), if requested by user. The actual method to use is determined
@@ -320,7 +322,8 @@ class RowMatrix @Since("1.0.0") (
}
/**
- * Computes the covariance matrix, treating each row as an observation.
+ * Computes the covariance matrix, treating each row as an observation. Note that this cannot
+ * be computed on matrices with more than 65535 columns.
* @return a local dense matrix of size n x n
*/
@Since("1.0.0")
@@ -374,6 +377,8 @@ class RowMatrix @Since("1.0.0") (
* The row data do not need to be "centered" first; it is not necessary for
* the mean of each column to be 0.
*
+ * Note that this cannot be computed on matrices with more than 65535 columns.
+ *
* @param k number of top principal components.
* @return a matrix of size n-by-k, whose columns are principal components
*/