|
| GaussLikLayer (int numPoints, int outputDim) |
| Constructor. More...
|
|
| ~GaussLikLayer () |
| Destructor. More...
|
|
Scalar | ComputeLogZ (const af::array &mout, const af::array &vout, const af::array &y, Scalar alpha=1.0, af::array *dlogZ_dm=nullptr, af::array *dlogZ_dv=nullptr, af::array *dlogZ_dm2=nullptr) |
| Calculates the logZ. More...
|
|
void | ComputeLogZGradients (const af::array &mout, const af::array &vout, const af::array &y, af::array *dlogZ_dm=nullptr, af::array *dlogZ_dv=nullptr, af::array *dlogZ_dm2=nullptr, Scalar alpha=1.0) |
| Calculates the logZ gradients. More...
|
|
Scalar | ComputeLogLikExp (const af::array &mout, const af::array &vout, const af::array &y) |
|
void | ComputeLogLikExpGradients (const af::array &mout, const af::array &vout, const af::array &y, af::array *de_dm=nullptr, af::array *de_dv=nullptr) |
|
Scalar | BackpropagationGradients (const af::array &mout, const af::array &vout, af::array &dmout, af::array &dvout, Scalar alpha=1.0, Scalar scale=1.0) |
|
Scalar | BackpropagationGradientsLogLikExp (const af::array &mout, const af::array &vout, af::array &dmout, af::array &dvout, af::array &y, Scalar scale=1.0) |
|
void | ProbabilisticOutput (const af::array &mf, const af::array &vf, af::array &myOut, af::array &vyOut, Scalar alpha=1.0f) |
|
virtual int | GetNumParameters () override |
| Gets number of parameters to be optimized. More...
|
|
virtual void | SetParameters (const af::array ¶m) override |
| Sets the parameters for each optimization iteration. More...
|
|
virtual af::array | GetParameters () override |
| Gets the parameters for each optimization iteration. More...
|
|
virtual void | UpdateParameters () override |
| Updates the parameters. More...
|
|
| LikelihoodBaseLayer (LogLikType type, int numPoints, int outputDim) |
| Constructor. More...
|
|
virtual Scalar | ComputeLogZ (const af::array &mout, const af::array &vout, const af::array &y, Scalar alpha=1.0, af::array *dlogZ_dm=nullptr, af::array *dlogZ_dv=nullptr, af::array *dlogZ_dm2=nullptr)=0 |
| Calculates the logZ. More...
|
|
virtual void | ComputeLogZGradients (const af::array &mout, const af::array &vout, const af::array &y, af::array *dlogZ_dm=nullptr, af::array *dlogZ_dv=nullptr, af::array *dlogZ_dm2=nullptr, Scalar alpha=1.0)=0 |
| Calculates logZ gradients. More...
|
|
virtual Scalar | BackpropagationGradients (const af::array &mout, const af::array &vout, af::array &dmout, af::array &dvout, Scalar alpha=1.0, Scalar scale=1.0)=0 |
|
virtual Scalar | ComputeLogLikExp (const af::array &mout, const af::array &vout, const af::array &y)=0 |
|
virtual void | ComputeLogLikExpGradients (const af::array &mout, const af::array &vout, const af::array &y, af::array *de_dm=nullptr, af::array *de_dv=nullptr)=0 |
|
virtual Scalar | BackpropagationGradientsLogLikExp (const af::array &mout, const af::array &vout, af::array &dmout, af::array &dvout, af::array &y, Scalar scale=1.0)=0 |
|
virtual void | ProbabilisticOutput (const af::array &mf, const af::array &vf, af::array &myOut, af::array &vyOut, Scalar alpha=1.0f)=0 |
|
virtual Scalar | InitParameters () |
|
LogLikType | GetLogLikType () |
| Gets log likelihood type. More...
|
|
virtual int | GetNumParameters () |
| Gets number of parameters to be optimized. More...
|
|
virtual void | SetParameters (const af::array ¶m) |
| Sets the parameters for each optimization iteration. More...
|
|
virtual af::array | GetParameters () |
| Gets the parameters for each optimization iteration. More...
|
|
virtual void | FixParameters (bool isfixed) |
| Set to fix the parameters or not for optimization. More...
|
|
virtual void | UpdateParameters () |
| Updates the parameters. More...
|
|
| ILayer (LayerType type, int numPoints, int outputDim) |
| Constructor. More...
|
|
virtual | ~ILayer ()=default |
| Destructor. More...
|
|
LayerType | GetType () |
| Gets the layer type. More...
|
|
virtual int | GetNumParameters ()=0 |
| Gets number of parameters to be optimized. More...
|
|
virtual void | SetParameters (const af::array ¶m)=0 |
| Sets the parameters for each optimization iteration. More...
|
|
virtual af::array | GetParameters ()=0 |
| Gets the parameters for each optimization iteration. More...
|
|
virtual void | UpdateParameters ()=0 |
| Updates the parameters. More...
|
|
virtual void | SetDataSize (int length, int dimension) |
| Sets data size. More...
|
|
template<typename
Scalar>
class NeuralEngine::MachineLearning::GPModels::GaussLikLayer< Scalar >
Likelihood estimation based on Gaussian distribution.
Approximating an unnormalized distribution means to replace it by a much simpler parametric distribution. This is often needed for untractable conditionals or integrals. This can be done via EP, PowerEP or VFE. The algorithms are based on minimization of Kullback-Leiber-Divergence and presuppose the distribution Q is restricted to belong to a family of probability distributions that is closed under the product operation. This is the exponential family:
Q(x ∣ θ) = exp(η(θ) * T(x) − A(θ)),
where η(θ) are the natural parameters, T(x) the sufficient statistics and A(θ) the log- normalizer, also known as logZ. Exponential family facilitates the parameter updates in each iteration step, because it needes just the first and second derivatives of logZ.
For a Gaussian distribution N(x|μ, σ^2) = 1/sqrt(2πσ^2) exp{−1/(2σ^2)(x−μ)^2} the ex- ponential family parameters are:
η(θ) = (μ / σ^2, −1/(2σ^2))^T,
T(x) = (x, x^2)^T,
A(θ) = 1/2 log(π/−η_2 − η_1^2/(4η_2).
Hmetal T, 04/05/2018.
Definition at line 50 of file FgGaussLikelihoodLayer.h.