Creates a column-major dense matrix.
Creates a column-major dense matrix.
number of rows
number of columns
matrix entries in column major
Generate a diagonal matrix in DenseMatrix
format from the supplied values.
Generate a diagonal matrix in DenseMatrix
format from the supplied values.
a Vector
tat will form the values on the diagonal of the matrix
Square DenseMatrix
with size values.length
x values.length
and values
on the diagonal
Generate an Identity Matrix in DenseMatrix
format.
Generate an Identity Matrix in DenseMatrix
format.
number of rows and columns of the matrix
DenseMatrix
with size n
x n
and values of ones on the diagonal
Generate a DenseMatrix
consisting of ones.
Generate a DenseMatrix
consisting of ones.
number of rows of the matrix
number of columns of the matrix
DenseMatrix
with size numRows
x numCols
and values of ones
Generate a DenseMatrix
consisting of i.
Generate a DenseMatrix
consisting of i.i.d. uniform random numbers.
number of rows of the matrix
number of columns of the matrix
a random number generator
DenseMatrix
with size numRows
x numCols
and values in U(0, 1)
Generate a DenseMatrix
consisting of i.
Generate a DenseMatrix
consisting of i.i.d. gaussian random numbers.
number of rows of the matrix
number of columns of the matrix
a random number generator
DenseMatrix
with size numRows
x numCols
and values in N(0, 1)
Creates a column-major sparse matrix in Compressed Sparse Column (CSC) format.
Creates a column-major sparse matrix in Compressed Sparse Column (CSC) format.
number of rows
number of columns
the index corresponding to the start of a new column
the row index of the entry
non-zero matrix entries in column major
Generate a DenseMatrix
consisting of zeros.
Generate a DenseMatrix
consisting of zeros.
number of rows of the matrix
number of columns of the matrix
DenseMatrix
with size numRows
x numCols
and values of zeros
Factory methods for org.apache.spark.mllib.linalg.Matrix.