13#include <MachineLearning/FgSparseGPLVMBaseModel.h>
17 namespace MachineLearning
65 template<
typename Scalar>
83 SGPLVM(
const af::array& Y,
int latentDimension,
int numInducing = 200,
Scalar alpha = 1.0,
Scalar priorMean = 0.0,
Scalar priorVariance = 1.0,
84 PropagationMode probMode = PropagationMode::MomentMatching, LogLikType lType = LogLikType::Gaussian, XInit emethod = XInit::pca);
129 af::array
CavityGradientLatents(
const af::array& dmx,
const af::array& dvx,
const af::array& m,
const af::array& v);
148 PropagationMode pMode;
150 friend class boost::serialization::access;
152 template<
class Archive>
153 void serialize(Archive& ar,
unsigned int version)
155 ar& boost::serialization::base_object<SparseGPLVMBaseModel<Scalar>>(*this);
157 ar& BOOST_SERIALIZATION_NVP(dAlpha);
158 ar& BOOST_SERIALIZATION_NVP(pMode);
Sparse GPLVM via Approximated Expectation Propagation (AEP).
void CavityLatents(af::array &mx, af::array &vx)
Computes the cavity distribution of the latent points.
virtual Scalar Function(const af::array &x, af::array &outGradient) override
Cost function the given parameter inputs.
SGPLVM()
Default constructor.
Scalar dAlpha
fraction parameter
af::array CavityGradientLatents(const af::array &dmx, const af::array &dvx, const af::array &m, const af::array &v)
Gradient of the cavity distribution w.r.t. latent points.
Scalar ComputePhiLatents(const af::array &mx, const af::array &vx, af::array *dmx=nullptr, af::array *dvx=nullptr)
Calculates the likelihood contribution of the latent points and its gradients.
SGPLVM(const af::array &Y, int latentDimension, int numInducing=200, Scalar alpha=1.0, Scalar priorMean=0.0, Scalar priorVariance=1.0, PropagationMode probMode=PropagationMode::MomentMatching, LogLikType lType=LogLikType::Gaussian, XInit emethod=XInit::pca)
Constructor.
Base class for all sparse GPLVM models.