Likelihood emission layer for State Space Models based on Gaussian distribution.
More...
|
| GaussEmission (const af::array &y, int outputDim, int inputDim) |
| Constructor. More...
|
|
virtual | ~GaussEmission () |
| Destructor. More...
|
|
virtual void | ProbabilisticOutput (const af::array &mf, const af::array &vf, af::array &myOut, af::array &vyOut, Scalar alpha=1.0f) |
| Probabilistic output. More...
|
|
virtual Scalar | ComputeLogZEmission (const af::array &mx, const af::array &vx, const af::array &y, const Scalar scale, std::map< std::string, af::array > *outGradInput, af::array &outHyperGrad, Scalar alpha=1.0) |
| Calculates tilted distribution and its gradients. 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 | UpdateParameters () |
| Updates the parameters. More...
|
|
virtual void | InitParameters () |
|
| 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::GaussEmission< Scalar >
Likelihood emission layer for State Space Models based on Gaussian distribution.
We assume that the emission likelihood takes a Gaussian form,
\[ p(\mathbf{y}_t|\mathbf{x}_t) = \mathcal{N}(\mathbf{y}_t;\mathbf{Ux}_t,\mathbf{R_y}),\]
and that the approximate factor \(\mathbf{γ}_t(\mathbf{x}_t)\) is also a Gaussian over \(\mathbf{x}_t\). As such, it is straightforward to show that in the Gaussian case, the parameters for \(\mathbf{\gamma}_t(\mathbf{x}_t)\) are identical to that of \(p(\mathbf{y}_t|\mathbf{x}_t)\), when \(p(\mathbf{y}_t|\mathbf{x}_t)\) is viewed as a Gaussian over \(\mathbf{x}_t\),
\[ \mathbf{\gamma}_t(\mathbf{x}_t)\propto \exp(−\frac{1}{2}\mathbf{x}_t\mathbf{U}^T\mathbf{R_y}\mathbf{Ux}^T_t+\mathbf{x}_t\mathbf{U}^T\mathbf{R_y}\mathbf{y}).\]
Note that this optimal form does not depend on the power parameter of Power EP, \(\alpha\). However,the log-normaliser of the tilted distribution and hence the contribution of the emission likelihood towards the approximate marginal likelihood does depend on \(\alpha\), as follows,
\[ \tilde{Z}=\int d\mathbf{x}_t q^{\backslash t}(\mathbf{x}_t) p^{\alpha}(\mathbf{y}_t|\mathbf{x}_t)
=\frac{(2\pi)^{D_y/2}|\alpha^{−1}\mathbf{R_y}|}{(2\pi)^{\alpha D_y/2}|\mathbf{R_y}|^{\alpha}}
\mathcal{N}(\mathbf{y}_t;\mathbf{Um}^{\backslash t}_{\mathbf{x}_t};\mathbf{US}^{\backslash t}_{\mathbf{x}_t}\mathbf{U}^T+\alpha^{−1}\mathbf{R_y}).\]
References:
HmetalT, 04/05/2022.
Definition at line 66 of file FgGaussEmissionLayer.h.