| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectFacemorph.Stats.PLSReducer
public class PLSReducer
| Nested Class Summary | 
|---|
| Nested classes/interfaces inherited from interface Facemorph.Stats.DataReducer | 
|---|
| DataReducer.DataReducerInformation | 
| Nested classes/interfaces inherited from interface Facemorph.Stats.Regressor | 
|---|
| Regressor.RegressorException | 
| Field Summary | |
|---|---|
| protected  BigMat | B | 
| protected  double[] | c | 
| protected  BigMat | C | 
| protected  BigMat | E | 
| protected  double | epsilon | 
| protected  BigMat | F | 
| protected  int | maxComponents | 
| protected  double | maxIter | 
| protected  double[] | meanX | 
| protected  double[] | meanY | 
| protected  int | noComponents | 
| protected  double[] | p | 
| protected  BigMat | P | 
| protected  double[] | q | 
| protected  BigMat | R | 
| protected  double[] | stdX | 
| protected  double[] | stdY | 
| protected  double[] | t | 
| protected  BigMat | T | 
| protected  double | targetDependentVariance | 
| protected  double | targetIndependentVariance | 
| protected  double[] | u | 
| protected  BigMat | U | 
| protected  double[] | varX | 
| protected  double[] | varY | 
| protected  double[] | w | 
| protected  BigMat | W | 
| protected  BigMat | X | 
| protected  BigMat | Y | 
| Constructor Summary | |
|---|---|
| PLSReducer() | |
| Method Summary | |
|---|---|
|  BigMat | apply(BigMat in)Apply the statistical model on the input data supplied in Matrix form | 
|  int | build() | 
|  void | center() | 
|  BigMat | getBasisMatrix()Outputs the basis matrix that is the result of PCA analysis | 
|  double | getEpsilon()Get epsilon, the very small error margin used the determine if the function has finished minimising. | 
|  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() | 
|  double | getTargetDependentVariance() | 
|  double | getTargetIndpendentVariance() | 
|  void | initialise() | 
|  void | iterate() | 
|  void | iterate(BigMat Ew,
        BigMat Fw) | 
| static void | main(java.lang.String[] args) | 
|  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 | 
| protected  void | print() | 
|  boolean | read(java.io.File f) | 
|  boolean | read(iniFile file)Read from the current position in an iniFile. | 
|  BigMat | reconstructDependent(BigMat in)Reconstruct (approximately) a high dimensional input given the low dimensional output | 
|  double[] | reconstructDependent(double[] in) | 
|  BigMat | reconstructIndependent(BigMat in)Reconstruct (approximately) a high dimensional input given the low dimensional output | 
|  double[] | reconstructIndependent(double[] in)Reconstruct (approximately) a high dimensional input given the low dimensional output | 
|  BigMat | reduceDependent(BigMat in)Perform dimensionality reduction on the BigMat | 
|  double[] | reduceDependent(double[] in) | 
|  BigMat | reduceIndependent(BigMat in)Perform dimensionality reduction on the BigMat (in) using a Least Squares approximation | 
|  double[] | reduceIndependent(double[] in)Perform dimensionality reduction on the vector (in) using a Least Squares approximation | 
|  void | setDependentData(BigMat data)The dependent part of the regression | 
|  void | setDependentData(double[] data)The dependent part of the regression | 
|  void | setEpsilon(double e)Set epsilon, the very small error margin used the determine if the function has finished minimising. | 
|  void | setIndependentData(BigMat data)The independent part of the regression | 
|  void | setOutputDimensions(int d)Set the maximum number of output dimensions in the model (pre-build, undefined if set after building some classes will alter the dimensionality of the reduction others will not) If d is greater than the number input variables, the model will truncate at the maximum number of variables. | 
|  void | setTargetDependentVariance(double var)Stop calculating components when the variance explained in the dependent variable is greater than var | 
|  void | setTargetIndependentVariance(double var)Stop calculating components when the variance explained in the independent variable is greater than var | 
|  void | setTargetKaiserGuttman() | 
|  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 double epsilon
protected double maxIter
protected double targetDependentVariance
protected double targetIndependentVariance
protected BigMat X
protected BigMat Y
protected double[] u
protected double[] t
protected double[] w
protected double[] p
protected double[] c
protected double[] q
protected double[] varX
protected double[] varY
protected double[] meanX
protected double[] meanY
protected double[] stdX
protected double[] stdY
protected BigMat T
protected BigMat P
protected BigMat U
protected BigMat W
protected BigMat C
protected BigMat B
protected BigMat R
protected BigMat E
protected BigMat F
protected int noComponents
protected int maxComponents
| Constructor Detail | 
|---|
public PLSReducer()
| Method Detail | 
|---|
public void setTargetDependentVariance(double var)
DataReducer
setTargetDependentVariance in interface DataReducervar - variance to explainpublic double getTargetDependentVariance()
getTargetDependentVariance in interface DataReducerpublic void setTargetIndependentVariance(double var)
DataReducer
setTargetIndependentVariance in interface DataReducervar - variance to explainpublic double getTargetIndpendentVariance()
getTargetIndpendentVariance in interface DataReducerpublic void setEpsilon(double e)
DataReducer
setEpsilon in interface DataReducere - error valuepublic double getEpsilon()
DataReducer
getEpsilon in interface DataReducerpublic 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 boolean train(boolean stats)
StatisticalModel
train in interface StatisticalModelstats - calculate values for statistical analysis
public void center()
public void initialise()
public void iterate(BigMat Ew,
                    BigMat Fw)
public int build()
public void iterate()
public BigMat reduceIndependent(BigMat in)
reduceIndependent in interface DataReducerin - BigMat to reduce
public double[] reduceIndependent(double[] in)
reduceIndependent in interface DataReducerin - Vector to reduce
public BigMat reconstructIndependent(BigMat in)
DataReducer
reconstructIndependent in interface DataReducerin - low dimensional matrix
public double[] reconstructDependent(double[] in)
reconstructDependent in interface DataReducerpublic void setOutputDimensions(int d)
DataReducer
setOutputDimensions in interface DataReducerd - target number of dimensions.public int getInputDimensions()
getInputDimensions in interface StatisticalModelpublic int getOutputDimensions()
getOutputDimensions in interface StatisticalModel
public boolean write(iniFile file,
                     java.lang.String name)
IniHandler
write in interface IniHandlerfile - The output ini file to fill with class data
public boolean read(iniFile file)
IniHandler
read in interface IniHandlerpublic double[] predict(BigMat values)
Regressor
predict in interface Regressorvalues - the independent values
public double getSumSquaredResiduals()
getSumSquaredResiduals in interface Regressorpublic boolean outputStatistics(java.io.File statsFile)
outputStatistics in interface StatisticalModelpublic java.lang.StringBuffer outputStatistics()
outputStatistics in interface StatisticalModelpublic BigMat getBasisMatrix()
public boolean read(java.io.File f)
             throws java.io.FileNotFoundException
read in interface Regressorjava.io.FileNotFoundExceptionpublic boolean write(java.io.File s)
Regressor
write in interface Regressors - the name of the file to write to
public boolean write(java.io.PrintStream out)
Regressor
write in interface Regressorout - The output PrintStream
public double[] reconstructIndependent(double[] in)
DataReducer
reconstructIndependent in interface DataReducerin - low dimensional vector
public double[] reduceDependent(double[] in)
reduceDependent in interface DataReducerpublic BigMat reduceDependent(BigMat in)
DataReducer
reduceDependent in interface DataReducerin - BigMat to reduce
public BigMat reconstructDependent(BigMat in)
DataReducer
reconstructDependent in interface DataReducerin - low dimensional matrix
protected void print()
public static void main(java.lang.String[] args)
                 throws java.io.IOException
java.io.IOExceptionpublic void getModelInformation(ModelInformation mi)
StatisticalModel
getModelInformation in interface StatisticalModelpublic BigMat apply(BigMat in)
StatisticalModel
apply in interface StatisticalModelin - matrix containing values for modeling
public void setTargetKaiserGuttman()
setTargetKaiserGuttman in interface DataReducerpublic 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 | |||||||||