Facemorph.Stats
Class WeightedPLS
java.lang.Object
Facemorph.Stats.PLSReducer
Facemorph.Stats.WeightedPLS
- All Implemented Interfaces:
- IniHandler, DataReducer, Regressor, StatisticalModel
- Direct Known Subclasses:
- WeightedPLS2
public class WeightedPLS
- extends PLSReducer
Fields inherited from class Facemorph.Stats.PLSReducer |
B, c, C, E, epsilon, F, maxComponents, maxIter, meanX, meanY, noComponents, p, P, q, R, stdX, stdY, t, T, targetDependentVariance, targetIndependentVariance, u, U, varX, varY, w, W, X, Y |
Methods inherited from class Facemorph.Stats.PLSReducer |
apply, center, getBasisMatrix, getEpsilon, getInputDimensions, getModelInformation, getModelInformation, getOutputDimensions, getSumSquaredResiduals, getTargetDependentVariance, getTargetIndpendentVariance, initialise, iterate, iterate, outputStatistics, outputStatistics, predict, print, read, read, reconstructDependent, reconstructDependent, reconstructIndependent, reconstructIndependent, reduceDependent, reduceDependent, reduceIndependent, reduceIndependent, setDependentData, setDependentData, setEpsilon, setIndependentData, setOutputDimensions, setTargetDependentVariance, setTargetIndependentVariance, setTargetKaiserGuttman, write, write, write |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
zWeights
protected double[] zWeights
wWeights
protected double[] wWeights
mapping
protected int[] mapping
WeightedPLS
public WeightedPLS()
train
public boolean train(boolean stats)
- Description copied from interface:
StatisticalModel
- Perform multi-linear regression using the Ordinary Least Squares method.
Solves y = XB + e
using b = inv(X'X)X'y
- Specified by:
train
in interface StatisticalModel
- Overrides:
train
in class PLSReducer
- Parameters:
stats
- calculate values for statistical analysis
- Returns:
- true if the regression succeeds.
reweight
public BigMat reweight(BigMat mat,
double[] weights)
reweight
public BigMat reweight(BigMat mat,
double[] weights,
double factor)
build
public int build()
- Overrides:
build
in class PLSReducer
calculateNewWeights
public void calculateNewWeights(BigMat Fw,
boolean[] preRemoved,
double[] newWeights,
boolean[] newRemoved)
main
public static void main(java.lang.String[] args)
throws java.io.IOException
- Throws:
java.io.IOException