|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectFacemorph.Stats.NumericRegressor
public class NumericRegressor
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface Facemorph.Stats.Regressor |
|---|
Regressor.RegressorException |
| Field Summary | |
|---|---|
protected double[] |
b
|
protected double[] |
e
Residuals after the regression calculation |
protected boolean |
interceptSetup
True if the intercept has been setup |
protected BigMat |
ProjectionMatrix
Projection Matix onto the space spanned by the columns of X (yhat = P.y) |
protected double |
rs
|
protected double |
ssr
Sum of Squares Residual Error |
protected double |
threshold
size of smallest numeric values |
protected double |
tss
Total sum of squares for the dependent variable |
protected boolean |
usingIntercept
True if is using intercept data, necessary for statistical analysis |
protected BigMat |
X
A set of predictor variables |
protected double[] |
y
A set of responce variables |
| Constructor Summary | |
|---|---|
NumericRegressor()
|
|
NumericRegressor(BigMat predictors,
double[] responses)
|
|
| Method Summary | |
|---|---|
protected void |
addInterceptColumn()
|
BigMat |
apply(BigMat in)
Apply the statistical model on the input data supplied in Matrix form |
int |
getInputDimensions()
|
void |
getModelInformation(ModelInformation mi)
Queries the statistical model about its abilities. |
void |
getModelInformation(ModelResults result)
Query the (previously built) model for information about the model's components |
int |
getOutputDimensions()
|
double |
getSumSquaredResiduals()
|
java.lang.StringBuffer |
outputStatistics()
|
boolean |
outputStatistics(java.io.File statsFile)
|
double[] |
predict(BigMat values)
Predict using the model the values of the dependent from a set of independents |
boolean |
read(java.io.File f)
|
boolean |
read(iniFile in)
Read from the current position in an iniFile. |
void |
setDependentData(BigMat data)
The dependent part of the regression |
void |
setDependentData(double[] data)
The dependent part of the regression |
void |
setIndependentData(BigMat data)
The independent part of the regression |
boolean |
train(boolean stats)
Perform multi-linear regression using the Ordinary Least Squares method. |
boolean |
write(java.io.File s)
Writes to the file specified |
boolean |
write(iniFile file,
java.lang.String name)
Writes this Template to file (via a PrintStream) |
boolean |
write(java.io.PrintStream out)
Writes this Template to file (via a PrintStream) |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected boolean usingIntercept
protected boolean interceptSetup
protected double ssr
protected double tss
protected double rs
protected double threshold
protected BigMat X
protected double[] y
protected BigMat ProjectionMatrix
protected double[] b
protected double[] e
| Constructor Detail |
|---|
public NumericRegressor()
public NumericRegressor(BigMat predictors,
double[] responses)
| Method Detail |
|---|
public boolean train(boolean stats)
train in interface StatisticalModelstats - calculate values for statistical analysis
public double[] predict(BigMat values)
predict in interface Regressorvalues - the independent values
public void setIndependentData(BigMat data)
setIndependentData in interface StatisticalModeldata - regression variablespublic void setDependentData(BigMat data)
setDependentData in interface StatisticalModeldata - regression variablespublic void setDependentData(double[] data)
setDependentData in interface StatisticalModeldata - regression variablesprotected void addInterceptColumn()
public boolean outputStatistics(java.io.File statsFile)
outputStatistics in interface StatisticalModelpublic java.lang.StringBuffer outputStatistics()
outputStatistics in interface StatisticalModelpublic double getSumSquaredResiduals()
getSumSquaredResiduals in interface Regressorpublic int getInputDimensions()
getInputDimensions in interface StatisticalModel
public boolean read(java.io.File f)
throws java.io.FileNotFoundException
read in interface Regressorjava.io.FileNotFoundExceptionpublic boolean read(iniFile in)
IniHandler
read in interface IniHandlerpublic boolean write(java.io.File s)
write in interface Regressors - the name of the file to write to
public boolean write(java.io.PrintStream out)
write in interface Regressorout - The output PrintStream
public boolean write(iniFile file,
java.lang.String name)
write in interface IniHandlerfile - The output ini file to fill with class data
public void getModelInformation(ModelInformation mi)
StatisticalModel
getModelInformation in interface StatisticalModelpublic BigMat apply(BigMat in)
StatisticalModel
apply in interface StatisticalModelin - matrix containing values for modeling
public int getOutputDimensions()
getOutputDimensions in interface StatisticalModelpublic void getModelInformation(ModelResults result)
StatisticalModel
getModelInformation in interface StatisticalModelresult - ModelResults object to fill with appropriate information
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||