|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--weka.classifiers.m5.Matrix
Class for handling a matrix
Constructor Summary | |
Matrix(int nr,
int nc)
Constructs a matrix |
Method Summary | |
void |
lubksb(int n,
int[] indx,
double[] b)
LU backward substitution |
int[] |
ludcmp(int n,
int[] indx)
LU decomposition |
Matrix |
multiply(Matrix b,
int l,
int m,
int n)
Reurns the multiplication of two matrices |
double[] |
regression(Matrix y,
int n,
int m)
Linear regression |
java.lang.String |
toString(int nrl,
int nrh,
int ncl,
int nch)
Converts a matrix to a string |
Matrix |
transpose(int n,
int m)
Returns the transpose of a matrix [0:n-1][0:m-1] |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Matrix(int nr, int nc)
nr
- the number of the rowsnc
- the number of the columnsMethod Detail |
public final java.lang.String toString(int nrl, int nrh, int ncl, int nch)
nrl
- the smallest index of the rowsnrh
- the largest index of the rowsncl
- the smallest index of the columnncl
- the largest index of the columnpublic final Matrix transpose(int n, int m)
n
- the number of rowsm
- the number of columnspublic final Matrix multiply(Matrix b, int l, int m, int n)
b
- the multiplication matrixl
- the number of the rows of the instance matrixm
- the number of the columns of the instance matrix, and the number of the rows of matrix bn
- the number of the columns of matrix bpublic final double[] regression(Matrix y, int n, int m)
y
- the dependent variable vectorn
- the number of the observationsm
- the number of the coefficientspublic final void lubksb(int n, int[] indx, double[] b)
n
- the number of the coefficientsindx
- the indexb
- the double vector, storing constant terms in the equation sets; it later stores the computed coefficients' valuespublic final int[] ludcmp(int n, int[] indx)
n
- the number of coefficientsindx
- the index
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |