Matrices

class pyspark.ml.linalg.Matrices[source]

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[source]

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[source]

Create a SparseMatrix