Package samer.models
Class GeneralisedExponential
- java.lang.Object
-
- samer.tools.NullTask
-
- samer.models.GeneralisedExponential
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description class
GeneralisedExponential.Trainer
-
Constructor Summary
Constructors Constructor and Description GeneralisedExponential(int n)
GeneralisedExponential(Vec x)
-
Method Summary
All Methods Static 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.static double
digamma(double t)
void
dispose()
Functionx
functionx()
This presents a more functional interface to the model so that it can be driven by an optimiser.VVector
getAlphas()
double
getEnergy()
return E = -log p(x)VDouble
getEnergySignal()
VVector
getEnergyVector()
double[]
getGradient()
return dE/dxint
getSize()
return size of vector this model expectsGeneralisedExponential.Trainer
getTrainer()
void
infer()
should infer values latent variablesvoid
run()
void
setInput(Vec in)
model should begin observing this vectorjava.lang.String
toString()
-
-
-
Constructor Detail
-
GeneralisedExponential
public GeneralisedExponential(int n)
-
GeneralisedExponential
public GeneralisedExponential(Vec x)
-
-
Method Detail
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
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
-
getAlphas
public VVector getAlphas()
-
run
public void run()
-
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.
-
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.
-
getTrainer
public GeneralisedExponential.Trainer getTrainer()
-
digamma
public static double digamma(double t)
-
-