Matrices

class pyspark.ml.linalg.Matrices

Methods

dense(numRows, numCols, values)

Create a DenseMatrix

sparse(numRows, numCols, colPtrs, …)

Create a SparseMatrix

Methods Documentation

static dense(numRows: int, numCols: int, values: Union[bytes, Iterable[float]])pyspark.ml.linalg.DenseMatrix

Create a DenseMatrix

static sparse(numRows: int, numCols: int, colPtrs: Union[bytes, Iterable[int]], rowIndices: Union[bytes, Iterable[int]], values: Union[bytes, Iterable[float]])pyspark.ml.linalg.SparseMatrix

Create a SparseMatrix