SparseMatrix¶
-
class
pyspark.mllib.linalg.SparseMatrix(numRows: int, numCols: int, colPtrs: Union[bytes, Iterable[int]], rowIndices: Union[bytes, Iterable[int]], values: Union[bytes, Iterable[float]], isTransposed: bool = False)¶ Sparse Matrix stored in CSC format.
Methods
asML()Convert this matrix to the new mllib-local representation.
toArray()Return an numpy.ndarray
toDense()Methods Documentation
-
asML() → pyspark.ml.linalg.SparseMatrix¶ Convert this matrix to the new mllib-local representation. This does NOT copy the data; it copies references.
- Returns
-
toArray() → numpy.ndarray¶ Return an numpy.ndarray
-
toDense() → pyspark.mllib.linalg.DenseMatrix¶
-