Package samer.models
Class SmoothGeneralisedExponential
- java.lang.Object
-
- samer.tools.AnonymousTask
-
- samer.tools.NamedTask
-
- samer.models.SmoothGeneralisedExponential
-
public class SmoothGeneralisedExponential extends NamedTask implements Model, java.util.Observer
Non-adaptive generalised exponential factorial prior: the pointy bit of the usual GeneralisedExponential has been smoothed out by blending with a quadratic.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface samer.models.Model
Model.Trainer
-
-
Constructor Summary
Constructors Constructor and Description SmoothGeneralisedExponential(int n)
SmoothGeneralisedExponential(Vec x)
-
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()
Functionx
functionx()
This presents a more functional interface to the model so that it can be driven by an optimiser.VVector
getAlpha()
double
getEnergy()
return E = -log p(x)VDouble
getEnergySignal()
VVector
getEnergyVector()
double[]
getGradient()
return dE/dxint
getSize()
return size of vector this model expectsvoid
infer()
should infer values latent variablesvoid
run()
void
setEps(double e)
void
setInput(Vec in)
model should begin observing this vectorvoid
update(java.util.Observable obs, java.lang.Object arg)
-
Methods inherited from class samer.tools.AnonymousTask
starting, stopping
-
-
-
-
Constructor Detail
-
SmoothGeneralisedExponential
public SmoothGeneralisedExponential(int n)
-
SmoothGeneralisedExponential
public SmoothGeneralisedExponential(Vec x)
-
-
Method Detail
-
update
public void update(java.util.Observable obs, java.lang.Object arg)
- Specified by:
update
in interfacejava.util.Observer
-
setEps
public void setEps(double e)
-
setInput
public void setInput(Vec in)
Description copied from interface:Model
model should begin observing this vector
-
getSize
public int getSize()
Description copied from interface:Model
return size of vector this model expects
-
dispose
public void dispose()
-
getEnergyVector
public VVector getEnergyVector()
-
getEnergySignal
public VDouble getEnergySignal()
-
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
-
getAlpha
public VVector getAlpha()
-
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.
-
-