Modifier and Type | Class and Description |
---|---|
class |
DenseMatrix
A Dense matrix.
|
class |
SparseMatrix
A sparse matrix
|
class |
SymmetricMatrix
Matrix where
aij = aji for all elements. |
Modifier and Type | Method and Description |
---|---|
static Matrix |
Matrix.dense(int n,
int m)
Create a zeroed dense matrix
|
static Matrix |
Matrix.from(int n,
int m,
double... values)
Build a matrix from the given values (row-major)
|
Matrix |
Matrix.newInstance() |
Matrix |
DenseMatrix.newInstance(int rows,
int cols) |
Matrix |
SparseMatrix.newInstance(int rows,
int cols) |
abstract Matrix |
Matrix.newInstance(int rows,
int cols) |
Modifier and Type | Method and Description |
---|---|
static FewEigenvalues |
FewEigenvalues.of(Matrix matrix) |
static Eigenvalues |
Eigenvalues.of(Matrix A)
Get an object that can compute the eigendecomposition of the given
matrix.
|
Constructor and Description |
---|
AllEigenvalues(Matrix A)
Construct with the given matrix
|
SingularValues(Matrix A,
int nev)
Construct with the given matrix and required number of S.V.s
|
Modifier and Type | Class and Description |
---|---|
class |
DiagonalMatrix |
class |
JamaDenseMatrix
Dense matrix wrapper for a JAMA matrix.
|
Modifier and Type | Method and Description |
---|---|
static <T extends Matrix> |
MatlibMatrixUtils.appendColumn(T m,
Vector col) |
static <T extends Matrix> |
MatlibMatrixUtils.appendRow(T m,
Vector row) |
static <T extends Matrix> |
MatlibMatrixUtils.copy(T sparseMatrix)
Copy a matrix
|
static <T extends Matrix> |
MatlibMatrixUtils.dotProductTranspose(Matrix A,
Matrix B,
T Y)
Y = A .
|
static <T extends Matrix> |
MatlibMatrixUtils.minus(double v,
T l) |
static <T extends Matrix> |
MatlibMatrixUtils.minus(T l,
double v) |
static <T extends Matrix> |
MatlibMatrixUtils.minusInplace(DiagonalMatrix D,
T A)
Subtract two matrices, storing the result in the second:
A = D - A |
static <T extends Matrix> |
MatlibMatrixUtils.plusInplace(DiagonalMatrix D,
T A)
Add two matrices, storing the results in the second:
A = D + A |
static <T extends Matrix> |
MatlibMatrixUtils.plusInplace(T A,
double d)
Add a constant inplace
A = A + d |
static <T extends Matrix> |
MatlibMatrixUtils.plusInplace(T A,
Matrix B)
Add two matrices, storing the results in the first:
A = A + B |
static <T extends Matrix> |
MatlibMatrixUtils.powInplace(T matrix,
double d)
Raise each element to the power d, operating on the matrix itself
|
static <T extends Matrix> |
MatlibMatrixUtils.scaleInplace(T A,
double s)
A = A .
|
static <T extends Matrix> |
MatlibMatrixUtils.subMatrix(T mat,
int rowstart,
int rowend,
int colstart,
int colend)
Extract the submatrix of the same type of mat
|
static <T extends Matrix> |
MatlibMatrixUtils.subMatrix(T mat,
int rowstart,
int rowend,
gnu.trove.list.array.TIntArrayList cols) |
static <T extends Matrix> |
MatlibMatrixUtils.subMatrix(T mat,
gnu.trove.list.array.TIntArrayList rows,
int colstart,
int colend) |
static <T extends Matrix> |
MatlibMatrixUtils.subMatrix(T mat,
gnu.trove.TIntCollection rows,
gnu.trove.TIntCollection cols)
Extract a submatrix from the given rows and cols
|
static <T extends Matrix> |
MatlibMatrixUtils.transpose(T mat)
Transpose a matrix, returning a new matrix.
|
Modifier and Type | Method and Description |
---|---|
static Matrix |
MatlibMatrixUtils.dotProduct(Matrix X,
Matrix W)
Compute the dot product X.W
|
static Matrix |
MatlibMatrixUtils.dotProductTranspose(Matrix A,
Matrix B)
Compute Y = A .
|
static Matrix |
MatlibMatrixUtils.dotProductTransposeTranspose(Matrix A,
Matrix B)
Perform: A.T.dot(B.T) without performing the transpose.
|
static Matrix |
MatlibMatrixUtils.fromCF(gov.sandia.cognition.math.matrix.Matrix init)
Create a
Matrix from the Cognitive Foundry equivalent |
static Matrix |
MatlibMatrixUtils.fromJama(Jama.Matrix sol) |
static Matrix |
MatlibMatrixUtils.fromMatlab(com.jmatio.types.MLArray mlArray)
Create a
Matrix from a matlab MLArray |
static Matrix |
MatlibMatrixUtils.minus(Matrix A,
Matrix B)
Subtract matrices A-B
|
static Matrix |
MatlibMatrixUtils.minusInplace(Matrix A,
Matrix B)
Subtract two matrices, storing the result in the first:
A = A - B |
Matrix |
DiagonalMatrix.newInstance(int rows,
int cols) |
Matrix |
JamaDenseMatrix.newInstance(int rows,
int cols) |
static Matrix |
MatlibMatrixUtils.timesInplace(Matrix A,
Matrix B) |
static Matrix |
MatlibMatrixUtils.transposeDotProduct(Matrix A,
Matrix B)
Compute A^T .
|
static Matrix |
MatlibMatrixUtils.vstack(Matrix... matricies)
Stack matrices vertically
|
Modifier and Type | Method and Description |
---|---|
static com.jmatio.types.MLDouble |
MatlibMatrixUtils.asMatlab(Matrix m) |
static Matrix |
MatlibMatrixUtils.dotProduct(Matrix X,
Matrix W)
Compute the dot product X.W
|
static Matrix |
MatlibMatrixUtils.dotProductTranspose(Matrix A,
Matrix B)
Compute Y = A .
|
static <T extends Matrix> |
MatlibMatrixUtils.dotProductTranspose(Matrix A,
Matrix B,
T Y)
Y = A .
|
static Matrix |
MatlibMatrixUtils.dotProductTransposeTranspose(Matrix A,
Matrix B)
Perform: A.T.dot(B.T) without performing the transpose.
|
static double |
MatlibMatrixUtils.max(Matrix mat)
uses the second value returned by
MatlibMatrixUtils.minmaxmean(Matrix) |
static double |
MatlibMatrixUtils.mean(Matrix mat)
uses the third value returned by
MatlibMatrixUtils.minmaxmean(Matrix) |
static double |
MatlibMatrixUtils.min(Matrix mat)
uses the first value returned by
MatlibMatrixUtils.minmaxmean(Matrix) |
static double[] |
MatlibMatrixUtils.minmaxmean(Matrix mat)
Calculate all 3, used by
MatlibMatrixUtils.min(Matrix) , MatlibMatrixUtils.max(Matrix) and
MatlibMatrixUtils.mean(Matrix) |
static Matrix |
MatlibMatrixUtils.minus(Matrix A,
Matrix B)
Subtract matrices A-B
|
static Matrix |
MatlibMatrixUtils.minusInplace(Matrix A,
Matrix B)
Subtract two matrices, storing the result in the first:
A = A - B |
static double |
MatlibMatrixUtils.normF(Matrix A)
Compute the Frobenius norm
|
static SparseMatrix |
MatlibMatrixUtils.plusInplace(SparseMatrix A,
Matrix B)
Add two matrices, storing the results in the first:
A = A + B |
static <T extends Matrix> |
MatlibMatrixUtils.plusInplace(T A,
Matrix B)
Add two matrices, storing the results in the first:
A = A + B |
static Jama.Matrix |
PseudoInverse.pseudoInverse(Matrix matrix,
int rank)
Compute the lower-rank approximation of the Moore-Penrose Pseudo-Inverse.
|
static void |
MatlibMatrixUtils.setSubMatrix(Matrix to,
int row,
int col,
Matrix from)
Set a submatrix of a larger matrix
|
static void |
MatlibMatrixUtils.setSubMatrixCol(Matrix to,
int row,
int col,
Vector v)
Starting from a given row of a column, set the values of a matrix to the
values of v
|
static void |
MatlibMatrixUtils.setSubMatrixRow(Matrix to,
int row,
int col,
Vector v)
Starting from a given column of a row, set the values of a matrix to the
values of v
|
static double |
MatlibMatrixUtils.sparsity(Matrix mat)
Compute the matrix sparsity (i.e.
|
static Matrix |
MatlibMatrixUtils.timesInplace(Matrix A,
Matrix B) |
static Jama.Matrix |
MatlibMatrixUtils.toJama(Matrix laplacian) |
static no.uib.cipr.matrix.Matrix |
MatlibMatrixUtils.toMTJ(Matrix sol) |
static Matrix |
MatlibMatrixUtils.transposeDotProduct(Matrix A,
Matrix B)
Compute A^T .
|
static Matrix |
MatlibMatrixUtils.vstack(Matrix... matricies)
Stack matrices vertically
|
Constructor and Description |
---|
DiagonalMatrix(Matrix mat) |
ThinSingularValueDecomposition(Matrix matrix,
int ndims)
Perform thin SVD on matrix, calculating at most ndims dimensions.
|
Modifier and Type | Field and Description |
---|---|
protected Matrix |
MatlibBilinearSparseOnlineLearner.bias |
protected Matrix |
MatlibBilinearSparseOnlineLearner.diagX |
protected Matrix |
MatlibBilinearSparseOnlineLearner.u |
protected Matrix |
MatlibBilinearSparseOnlineLearner.w |
Modifier and Type | Method and Description |
---|---|
Matrix |
MatlibBilinearSparseOnlineLearner.getBias() |
Matrix |
MatlibBilinearSparseOnlineLearner.getU() |
Matrix |
MatlibBilinearSparseOnlineLearner.getW() |
Matrix |
MatlibBilinearSparseOnlineLearner.predict(Matrix x) |
protected Matrix |
MatlibBilinearSparseOnlineLearner.updateBias(Matrix biasGrad,
double biasLossWeight) |
protected Matrix |
MatlibBilinearSparseOnlineLearner.updateU(Matrix currentU,
double uLossWeight,
double uWeightedLambda) |
protected Matrix |
MatlibBilinearSparseOnlineLearner.updateW(Matrix currentW,
double wLossWeighted,
double weightedLambda) |
Modifier and Type | Method and Description |
---|---|
static SparseMatrix |
MatlibBilinearSparseOnlineLearner.expandY(Matrix Y)
Given a flat value matrix, makes a diagonal sparse matrix containing the values as the diagonal
|
Matrix |
MatlibBilinearSparseOnlineLearner.predict(Matrix x) |
void |
MatlibBilinearSparseOnlineLearner.process(Matrix X,
Matrix Y) |
void |
MatlibBilinearSparseOnlineLearner.setU(Matrix newu) |
void |
MatlibBilinearSparseOnlineLearner.setW(Matrix neww) |
protected Matrix |
MatlibBilinearSparseOnlineLearner.updateBias(Matrix biasGrad,
double biasLossWeight) |
protected Matrix |
MatlibBilinearSparseOnlineLearner.updateU(Matrix currentU,
double uLossWeight,
double uWeightedLambda) |
protected Matrix |
MatlibBilinearSparseOnlineLearner.updateW(Matrix currentW,
double wLossWeighted,
double weightedLambda) |
Modifier and Type | Method and Description |
---|---|
Matrix |
SparseSingleValueInitStrat.init(int rows,
int cols) |
Matrix |
InitStrategy.init(int rows,
int cols) |
Matrix |
SingleValueInitStrat.init(int rows,
int cols) |
Matrix |
SparseZerosInitStrategy.init(int rows,
int cols) |
Modifier and Type | Field and Description |
---|---|
protected Matrix |
LossFunction.bias |
protected Matrix |
LossFunction.X |
protected Matrix |
LossFunction.Y |
Modifier and Type | Method and Description |
---|---|
Matrix |
MatLossFunction.gradient(Matrix W) |
Matrix |
MatSquareLossFunction.gradient(Matrix W) |
abstract Matrix |
LossFunction.gradient(Matrix W) |
Modifier and Type | Method and Description |
---|---|
double |
MatLossFunction.eval(Matrix W) |
double |
MatSquareLossFunction.eval(Matrix W) |
abstract double |
LossFunction.eval(Matrix W) |
Matrix |
MatLossFunction.gradient(Matrix W) |
Matrix |
MatSquareLossFunction.gradient(Matrix W) |
abstract Matrix |
LossFunction.gradient(Matrix W) |
void |
MatLossFunction.setBias(Matrix bias) |
void |
LossFunction.setBias(Matrix bias) |
void |
MatLossFunction.setX(Matrix X) |
void |
LossFunction.setX(Matrix X) |
void |
MatLossFunction.setY(Matrix Y) |
void |
LossFunction.setY(Matrix Y) |
Modifier and Type | Method and Description |
---|---|
Matrix |
Regulariser.prox(Matrix W,
double lambda) |
Matrix |
L1Regulariser.prox(Matrix W,
double lambda) |
Matrix |
L1L2Regulariser.prox(Matrix W,
double lambda) |
Modifier and Type | Method and Description |
---|---|
Matrix |
Regulariser.prox(Matrix W,
double lambda) |
Matrix |
L1Regulariser.prox(Matrix W,
double lambda) |
Matrix |
L1L2Regulariser.prox(Matrix W,
double lambda) |