|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectweka.core.matrix.LinearRegression
public class LinearRegression
Class for performing (ridged) linear regression.
Constructor Summary | |
---|---|
LinearRegression(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. |
Method Summary | |
---|---|
double[] |
getCoefficients()
returns the calculated coefficients |
java.lang.String |
getRevision()
Returns the revision string. |
java.lang.String |
toString()
returns the coefficients in a string representation |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public LinearRegression(Matrix a, Matrix y, double ridge)
a
- the matrix to perform the regression ony
- the dependent variable vectorridge
- the ridge parameter
java.lang.IllegalArgumentException
- if not successfulpublic LinearRegression(Matrix a, Matrix y, double[] w, double ridge)
a
- the matrix to perform the regression ony
- the dependent variable vectorw
- the array of data point weightsridge
- the ridge parameter
java.lang.IllegalArgumentException
- if the wrong number of weights were
provided.Method Detail |
---|
public final double[] getCoefficients()
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getRevision()
getRevision
in interface RevisionHandler
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |