Generate a SparseMatrix
from Coordinate List (COO) format.
Generate a SparseMatrix
from Coordinate List (COO) format. Input must be an array of
(i, j, value) tuples. Entries that have duplicate values of i and j are
added together. Tuples where value is equal to zero will be omitted.
number of rows of the matrix
number of columns of the matrix
Array of (i, j, value) tuples
The corresponding SparseMatrix
Generate a diagonal matrix in SparseMatrix
format from the supplied values.
Generate a diagonal matrix in SparseMatrix
format from the supplied values.
a Vector
that will form the values on the diagonal of the matrix
Square SparseMatrix
with size values.length
x values.length
and non-zero
values
on the diagonal
Generate an Identity Matrix in SparseMatrix
format.
Generate an Identity Matrix in SparseMatrix
format.
number of rows and columns of the matrix
SparseMatrix
with size n
x n
and values of ones on the diagonal
Generate a SparseMatrix
consisting of i.i.d
.
Generate a SparseMatrix
consisting of i.i.d
. uniform random numbers. The number of non-zero
elements equal the ceiling of numRows
x numCols
x density
number of rows of the matrix
number of columns of the matrix
the desired density for the matrix
a random number generator
SparseMatrix
with size numRows
x numCols
and values in U(0, 1)
Generate a SparseMatrix
consisting of i.i.d
.
Generate a SparseMatrix
consisting of i.i.d
. gaussian random numbers.
number of rows of the matrix
number of columns of the matrix
the desired density for the matrix
a random number generator
SparseMatrix
with size numRows
x numCols
and values in N(0, 1)
Factory methods for org.apache.spark.ml.linalg.SparseMatrix.