Package samer.models
Class ICA
- java.lang.Object
-
- Viewable
-
- samer.models.ICA
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description class
ICA.NewtonTrainer
class
ICA.ON2DecayWhenActive
class
ICA.ON2Trainer
This trainer uses an O(N^2) run step and an O(N^2) flush.class
ICA.ON3Trainer
This trainer saves on an O(N^2) step during accumulation, at the expense of an O(N^3) flush.-
Nested classes/interfaces inherited from interface samer.models.Model
Model.Trainer
-
-
Constructor Summary
Constructors Constructor and Description ICA(int N)
ICA(Node node, int N)
ICA(Vec input)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description void
compute()
contract is that getEnergy and getGradient must return correct values for current x after infer and compute has been called, but not necessarily before.void
dispose()
void
execute(java.lang.String cmd, Environment env)
Functionx
functionx()
This presents a more functional interface to the model so that it can be driven by an optimiser.Model.Trainer
getAltTrainer()
Matrix
getBasisMatrix()
void
getCommands(Registry r)
Model.Trainer
getDecayWhenActiveTrainer()
double
getEnergy()
return E = -log p(x)double[]
getGradient()
return dE/dxModel
getOutputModel()
int
getSize()
return size of vector this model expectsModel.Trainer
getTrainer()
Matrix
getWeightMatrix()
void
infer()
should infer values latent variablesVVector
output()
void
run()
void
setInput(Vec input)
model should begin observing this vectorvoid
setOutputModel(Model m)
void
starting()
void
stopping()
-
-
-
Constructor Detail
-
ICA
public ICA(int N)
-
ICA
public ICA(Node node, int N)
-
ICA
public ICA(Vec input)
-
-
Method Detail
-
getSize
public int getSize()
Description copied from interface:Model
return size of vector this model expects
-
output
public VVector output()
-
getOutputModel
public Model getOutputModel()
-
setOutputModel
public void setOutputModel(Model m)
-
setInput
public void setInput(Vec input)
Description copied from interface:Model
model should begin observing this vector
-
getWeightMatrix
public Matrix getWeightMatrix()
-
getBasisMatrix
public Matrix getBasisMatrix()
-
dispose
public void dispose()
-
infer
public void infer()
Description copied from interface:Model
should infer values latent variables
-
compute
public void compute()
Description copied from interface:Model
contract is that getEnergy and getGradient must return correct values for current x after infer and compute has been called, but not necessarily before. This is to give model an opportunity to cache values of energy and gradient to avoid repeated computations.
-
getEnergy
public double getEnergy()
Description copied from interface:Model
return E = -log p(x)
-
getGradient
public double[] getGradient()
Description copied from interface:Model
return dE/dx- Specified by:
getGradient
in interfaceModel
-
functionx
public Functionx functionx()
Description copied from interface:Model
This presents a more functional interface to the model so that it can be driven by an optimiser. See classes Functionx and MinimiserBase in package samer.maths.opt.
-
getCommands
public void getCommands(Registry r)
-
execute
public void execute(java.lang.String cmd, Environment env)
-
getTrainer
public Model.Trainer getTrainer()
-
getAltTrainer
public Model.Trainer getAltTrainer()
-
getDecayWhenActiveTrainer
public Model.Trainer getDecayWhenActiveTrainer()
-
-