|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectFacemorph.Stats.DifferenceOfAverages
public class DifferenceOfAverages
Technically similar to a linear regressor, DifferenceOfAverages describes a function as a line connecting two points Distances along the line a scaled such that point 1 is considered to be the 0.0 point and point 2 the 1.0 point
| Nested Class Summary | |
|---|---|
class |
DifferenceOfAverages.DiffernceOfAveragesException
|
| Nested classes/interfaces inherited from interface Facemorph.Stats.Regressor |
|---|
Regressor.RegressorException |
| Constructor Summary | |
|---|---|
DifferenceOfAverages()
|
|
| Method Summary | |
|---|---|
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)
The projection of a point onto a line is given by the inner produce of the point to the source divided by the square magnitude of the line |
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 |
| Constructor Detail |
|---|
public DifferenceOfAverages()
| Method Detail |
|---|
public boolean train(boolean stats)
StatisticalModel
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)
StatisticalModel
setIndependentData in interface StatisticalModelpublic void setDependentData(BigMat data)
StatisticalModel
setDependentData in interface StatisticalModelpublic void setDependentData(double[] data)
StatisticalModel
setDependentData in interface StatisticalModelpublic double getSumSquaredResiduals()
getSumSquaredResiduals in interface Regressorpublic int getInputDimensions()
getInputDimensions in interface StatisticalModelpublic boolean outputStatistics(java.io.File statsFile)
outputStatistics in interface StatisticalModelpublic java.lang.StringBuffer outputStatistics()
outputStatistics 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 | |||||||||