org.apache.spark.mllib.linalg.distributed

RowMatrix

class RowMatrix extends DistributedMatrix with Logging

:: Experimental :: Represents a row-oriented distributed Matrix with no meaningful row indices.

Annotations
@Experimental()
Linear Supertypes
Logging, DistributedMatrix, Serializable, Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. RowMatrix
  2. Logging
  3. DistributedMatrix
  4. Serializable
  5. Serializable
  6. AnyRef
  7. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new RowMatrix(rows: RDD[Vector])

    Alternative constructor leaving matrix dimensions to be determined automatically.

  2. new RowMatrix(rows: RDD[Vector], nRows: Long, nCols: Int)

    rows

    rows stored as an RDD[Vector]

    nRows

    number of rows. A non-positive value means unknown, and then the number of rows will be determined by the number of records in the RDD rows.

    nCols

    number of columns. A non-positive value means unknown, and then the number of columns will be determined by the size of the first row.

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. def computeColumnSummaryStatistics(): MultivariateStatisticalSummary

    Computes column-wise summary statistics.

  9. def computeCovariance(): Matrix

    Computes the covariance matrix, treating each row as an observation.

    Computes the covariance matrix, treating each row as an observation.

    returns

    a local dense matrix of size n x n

  10. def computeGramianMatrix(): Matrix

    Computes the Gramian matrix A^T A.

  11. def computePrincipalComponents(k: Int): Matrix

    Computes the top k principal components.

    Computes the top k principal components. Rows correspond to observations and columns correspond to variables. The principal components are stored a local matrix of size n-by-k. Each column corresponds for one principal component, and the columns are in descending order of component variance.

    k

    number of top principal components.

    returns

    a matrix of size n-by-k, whose columns are principal components

  12. def computeSVD(k: Int, computeU: Boolean = false, rCond: Double = 1e-9): SingularValueDecomposition[RowMatrix, Matrix]

    Computes the singular value decomposition of this matrix.

    Computes the singular value decomposition of this matrix. Denote this matrix by A (m x n), this will compute matrices U, S, V such that A = U * S * V'.

    There is no restriction on m, but we require n^2 doubles to fit in memory. Further, n should be less than m.

    The decomposition is computed by first computing A'A = V S2 V', computing svd locally on that (since n x n is small), from which we recover S and V. Then we compute U via easy matrix multiplication as U = A * (V * S-1). Note that this approach requires O(n^3) time on the master node.

    At most k largest non-zero singular values and associated vectors are returned. If there are k such values, then the dimensions of the return will be:

    U is a RowMatrix of size m x k that satisfies U'U = eye(k), s is a Vector of size k, holding the singular values in descending order, and V is a Matrix of size n x k that satisfies V'V = eye(k).

    k

    number of singular values to keep. We might return less than k if there are numerically zero singular values. See rCond.

    computeU

    whether to compute U

    rCond

    the reciprocal condition number. All singular values smaller than rCond * sigma(0) are treated as zero, where sigma(0) is the largest singular value.

    returns

    SingularValueDecomposition(U, s, V)

  13. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  14. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  15. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  16. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  17. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  18. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  19. def isTraceEnabled(): Boolean

    Attributes
    protected
    Definition Classes
    Logging
  20. def log: Logger

    Attributes
    protected
    Definition Classes
    Logging
  21. def logDebug(msg: ⇒ String, throwable: Throwable): Unit

    Attributes
    protected
    Definition Classes
    Logging
  22. def logDebug(msg: ⇒ String): Unit

    Attributes
    protected
    Definition Classes
    Logging
  23. def logError(msg: ⇒ String, throwable: Throwable): Unit

    Attributes
    protected
    Definition Classes
    Logging
  24. def logError(msg: ⇒ String): Unit

    Attributes
    protected
    Definition Classes
    Logging
  25. def logInfo(msg: ⇒ String, throwable: Throwable): Unit

    Attributes
    protected
    Definition Classes
    Logging
  26. def logInfo(msg: ⇒ String): Unit

    Attributes
    protected
    Definition Classes
    Logging
  27. def logTrace(msg: ⇒ String, throwable: Throwable): Unit

    Attributes
    protected
    Definition Classes
    Logging
  28. def logTrace(msg: ⇒ String): Unit

    Attributes
    protected
    Definition Classes
    Logging
  29. def logWarning(msg: ⇒ String, throwable: Throwable): Unit

    Attributes
    protected
    Definition Classes
    Logging
  30. def logWarning(msg: ⇒ String): Unit

    Attributes
    protected
    Definition Classes
    Logging
  31. def multiply(B: Matrix): RowMatrix

    Multiply this matrix by a local matrix on the right.

    Multiply this matrix by a local matrix on the right.

    B

    a local matrix whose number of rows must match the number of columns of this matrix

    returns

    a org.apache.spark.mllib.linalg.distributed.RowMatrix representing the product, which preserves partitioning

  32. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  33. final def notify(): Unit

    Definition Classes
    AnyRef
  34. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  35. def numCols(): Long

    Gets or computes the number of columns.

    Gets or computes the number of columns.

    Definition Classes
    RowMatrixDistributedMatrix
  36. def numRows(): Long

    Gets or computes the number of rows.

    Gets or computes the number of rows.

    Definition Classes
    RowMatrixDistributedMatrix
  37. val rows: RDD[Vector]

    rows stored as an RDD[Vector]

  38. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  39. def toString(): String

    Definition Classes
    AnyRef → Any
  40. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  41. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  42. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Logging

Inherited from DistributedMatrix

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped