Uses of Class
weka.core.matrix.Matrix
-
Uses of Matrix in weka.classifiers.evaluation
Modifier and TypeClassDescriptionclass
Cells of this matrix correspond to counts of the number (or weight) of predictions for each actual value / predicted value combination. -
Uses of Matrix in weka.core
Modifier and TypeMethodDescriptionstatic double[]
Optimization.solveTriangle
(Matrix t, double[] b, boolean isLower, boolean[] isZero) Solve the linear equation of TX=B where T is a triangle matrix It can be solved using back/forward substitution, with O(N^2) complexity -
Uses of Matrix in weka.core.matrix
Modifier and TypeMethodDescriptionMatrix.arrayLeftDivide
(Matrix B) Element-by-element left division, C = A.\BMatrix.arrayLeftDivideEquals
(Matrix B) Element-by-element left division in place, A = A.\BMatrix.arrayRightDivide
(Matrix B) Element-by-element right division, C = A./BMatrix.arrayRightDivideEquals
(Matrix B) Element-by-element right division in place, A = A./BMatrix.arrayTimes
(Matrix B) Element-by-element multiplication, C = A.*BMatrix.arrayTimesEquals
(Matrix B) Element-by-element multiplication in place, A = A.*Bstatic Matrix
Matrix.constructWithCopy
(double[][] A) Construct a matrix from a copy of a 2-D array.Matrix.copy()
Make a deep copy of a matrixEigenvalueDecomposition.getD()
Return the block diagonal eigenvalue matrixQRDecomposition.getH()
Return the Householder vectorsCholeskyDecomposition.getL()
Return triangular factor.LUDecomposition.getL()
Return lower triangular factorMatrix.getMatrix
(int[] r, int[] c) Get a submatrix.Matrix.getMatrix
(int[] r, int j0, int j1) Get a submatrix.Matrix.getMatrix
(int i0, int i1, int[] c) Get a submatrix.Matrix.getMatrix
(int i0, int i1, int j0, int j1) Get a submatrix.QRDecomposition.getQ()
Generate and return the (economy-sized) orthogonal factorQRDecomposition.getR()
Return the upper triangular factorSingularValueDecomposition.getS()
Return the diagonal matrix of singular valuesLUDecomposition.getU()
Return upper triangular factorSingularValueDecomposition.getU()
Return the left singular vectorsEigenvalueDecomposition.getV()
Return the eigenvector matrixSingularValueDecomposition.getV()
Return the right singular vectorsstatic Matrix
Matrix.identity
(int m, int n) Generate identity matrixMatrix.inverse()
Matrix inverse or pseudoinverseC = A - BMatrix.minusEquals
(Matrix B) A = A - Bstatic Matrix
Matrix.parseMatlab
(String matlab) creates a matrix from the given Matlab string.C = A + BMatrix.plusEquals
(Matrix B) A = A + Bstatic Matrix
Matrix.random
(int m, int n) Generate matrix with random elementsstatic Matrix
Matrix.read
(BufferedReader input) Read a matrix from a stream.Solve A*X = BSolve A*X = BSolve A*X = BLeast squares solution of A*X = BMatrix.solveTranspose
(Matrix B) Solve X*A = B, which is also A'*X' = B'Matrix.sqrt()
returns the square root of the matrix, i.e., X from the equation X*X = A.
Steps in the Calculation (seesqrtm
in Matlab):
perform eigenvalue decomposition
[V,D]=eig(A) take the square root of all elements in D (only the ones with positive sign are considered for further computation)
S=sqrt(D) calculate the root
X=V*S/V, which can be also written as X=(V'\(V*S)')'Matrix.times
(double s) Multiply a matrix by a scalar, C = s*ALinear algebraic matrix multiplication, A * BMatrix.timesEquals
(double s) Multiply a matrix by a scalar in place, A = s*AMatrix.transpose()
Matrix transpose.Matrix.uminus()
Unary minusModifier and TypeMethodDescriptionMatrix.arrayLeftDivide
(Matrix B) Element-by-element left division, C = A.\BMatrix.arrayLeftDivideEquals
(Matrix B) Element-by-element left division in place, A = A.\BMatrix.arrayRightDivide
(Matrix B) Element-by-element right division, C = A./BMatrix.arrayRightDivideEquals
(Matrix B) Element-by-element right division in place, A = A./BMatrix.arrayTimes
(Matrix B) Element-by-element multiplication, C = A.*BMatrix.arrayTimesEquals
(Matrix B) Element-by-element multiplication in place, A = A.*BC = A - BMatrix.minusEquals
(Matrix B) A = A - BC = A + BMatrix.plusEquals
(Matrix B) A = A + BMatrix.regression
(Matrix y, double ridge) Performs a (ridged) linear regression.final LinearRegression
Matrix.regression
(Matrix y, double[] w, double ridge) Performs a weighted (ridged) linear regression.void
Set a submatrix.void
Set a submatrix.void
Set a submatrix.void
Set a submatrix.Solve A*X = BSolve A*X = BSolve A*X = BLeast squares solution of A*X = BMatrix.solveTranspose
(Matrix B) Solve X*A = B, which is also A'*X' = B'Linear algebraic matrix multiplication, A * BModifierConstructorDescriptionCholesky algorithm for symmetric and positive definite matrix.Check for symmetry, then construct the eigenvalue decompositionLinearRegression
(Matrix a, Matrix y, double ridge) Performs a (ridged) linear regression.LinearRegression
(Matrix a, Matrix y, double[] w, double ridge) Performs a weighted (ridged) linear regression.LU DecompositionQR Decomposition, computed by Householder reflections.Construct the singular value decomposition -
Uses of Matrix in weka.estimators
ModifierConstructorDescriptionMahalanobisEstimator
(Matrix covariance, double constDelta, double valueMean) Constructor