Matrices

class pyspark.mllib.linalg.Matrices[source]

Methods

Methods Documentation

static dense(numRows, numCols, values)[source]

Create a DenseMatrix

static fromML(mat)[source]

Convert a matrix from the new mllib-local representation. This does NOT copy the data; it copies references.

Parameters

mat – a pyspark.ml.linalg.Matrix

Returns

a pyspark.mllib.linalg.Matrix

New in version 2.0.0.

static sparse(numRows, numCols, colPtrs, rowIndices, values)[source]

Create a SparseMatrix