Package samer.models
Interface Model
-
- All Known Implementing Classes:
- AlignedGaussian, DiffScaler, GeneralisedExponential, ICA, ICAWithScaler, IIDPrior, Mixture, NoisyICA, Scaler, SmoothGeneralisedExponential, SparseICA, VarianceICA
public interface Model
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface and Description static interface
Model.Trainer
This represents a training algorithm for a Model Trainer is responsible for counting calls to accumulate() between flushes
-
Method Summary
All Methods Instance Methods Abstract 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()
Functionx
functionx()
This presents a more functional interface to the model so that it can be driven by an optimiser.double
getEnergy()
return E = -log p(x)double[]
getGradient()
return dE/dxint
getSize()
return size of vector this model expectsvoid
infer()
should infer values latent variablesvoid
setInput(Vec x)
model should begin observing this vector
-
-
-
Method Detail
-
getSize
int getSize()
return size of vector this model expects
-
setInput
void setInput(Vec x)
model should begin observing this vector
-
infer
void infer()
should infer values latent variables
-
compute
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. This is to give model an opportunity to cache values of energy and gradient to avoid repeated computations.
-
getEnergy
double getEnergy()
return E = -log p(x)
-
getGradient
double[] getGradient()
return dE/dx
-
dispose
void dispose()
-
functionx
Functionx functionx()
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.
-
-