All Packages Class Hierarchy This Package Previous Next Index WEKA's home
Class weka.classifiers.m5.Matrix
java.lang.Object
|
+----weka.classifiers.m5.Matrix
- public final class Matrix
- extends Object
Class for handling a matrix
- Version:
- $Revision: 1.2 $
- Author:
- Yong Wang (yongwang@cs.waikato.ac.nz)
-
Matrix(int, int)
- Constructs a matrix
-
lubksb(int, int[], double[])
- LU backward substitution
-
ludcmp(int, int[])
- LU decomposition
-
multiply(Matrix, int, int, int)
- Reurns the multiplication of two matrices
-
regression(Matrix, int, int)
- Linear regression
-
toString(int, int, int, int)
-
Converts a matrix to a string
-
transpose(int, int)
- Returns the transpose of a matrix [0:n-1][0:m-1]
Matrix
public Matrix(int nr,
int nc)
- Constructs a matrix
- Parameters:
- nr - the number of the rows
- nc - the number of the columns
toString
public final String toString(int nrl,
int nrh,
int ncl,
int nch)
- Converts a matrix to a string
- Parameters:
- nrl - the smallest index of the rows
- nrh - the largest index of the rows
- ncl - the smallest index of the column
- ncl - the largest index of the column
- Returns:
- the converted string
transpose
public final Matrix transpose(int n,
int m)
- Returns the transpose of a matrix [0:n-1][0:m-1]
- Parameters:
- n - the number of rows
- m - the number of columns
- Returns:
- the transposed matrix
multiply
public final Matrix multiply(Matrix b,
int l,
int m,
int n)
- Reurns the multiplication of two matrices
- Parameters:
- b - the multiplication matrix
- l - the number of the rows of the instance matrix
- m - the number of the columns of the instance matrix, and the number of the rows of matrix b
- n - the number of the columns of matrix b
- Returns:
- the product matrix
regression
public final double[] regression(Matrix y,
int n,
int m)
- Linear regression
- Parameters:
- y - the dependent variable vector
- n - the number of the observations
- m - the number of the coefficients
- Returns:
- the coefficients
lubksb
public final void lubksb(int n,
int indx[],
double b[])
- LU backward substitution
- Parameters:
- n - the number of the coefficients
- indx - the index
- b - the double vector, storing constant terms in the equation sets; it later stores the computed coefficients' values
ludcmp
public final int[] ludcmp(int n,
int indx[])
- LU decomposition
- Parameters:
- n - the number of coefficients
- indx - the index
- Returns:
- the integer vector of the attributes's singularities
All Packages Class Hierarchy This Package Previous Next Index WEKA's home