org.apache.spark.mllib.linalg.distributed
Class IndexedRowMatrix
Object
org.apache.spark.mllib.linalg.distributed.IndexedRowMatrix
- All Implemented Interfaces:
- java.io.Serializable, DistributedMatrix
public class IndexedRowMatrix
- extends Object
- implements DistributedMatrix
- See Also:
- Serialized Form
Methods inherited from class Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
IndexedRowMatrix
public IndexedRowMatrix(RDD<IndexedRow> rows,
long nRows,
int nCols)
IndexedRowMatrix
public IndexedRowMatrix(RDD<IndexedRow> rows)
rows
public RDD<IndexedRow> rows()
numCols
public long numCols()
- Description copied from interface:
DistributedMatrix
- Gets or computes the number of columns.
- Specified by:
numCols
in interface DistributedMatrix
numRows
public long numRows()
- Description copied from interface:
DistributedMatrix
- Gets or computes the number of rows.
- Specified by:
numRows
in interface DistributedMatrix
toRowMatrix
public RowMatrix toRowMatrix()
toBlockMatrix
public BlockMatrix toBlockMatrix()
toBlockMatrix
public BlockMatrix toBlockMatrix(int rowsPerBlock,
int colsPerBlock)
toCoordinateMatrix
public CoordinateMatrix toCoordinateMatrix()
computeSVD
public SingularValueDecomposition<IndexedRowMatrix,Matrix> computeSVD(int k,
boolean computeU,
double rCond)
multiply
public IndexedRowMatrix multiply(Matrix B)
computeGramianMatrix
public Matrix computeGramianMatrix()