13#include <MachineLearning/FgSparseDeepGPSSMBaseModel.h>
17 namespace MachineLearning
65 template<
typename Scalar>
81 Scalar priorMean = 0.0,
Scalar priorVariance = 1.0, af::array xControl = af::array(),
82 PropagationMode probMode = PropagationMode::MomentMatching, LogLikType lType = LogLikType::Gaussian, XInit emethod = XInit::pca);
94 SDGPSSM(
const af::array& Y,
int latentDimension, std::vector<HiddenLayerDescription> descriptions,
Scalar alpha = 1.0,
95 Scalar priorMean = 0.0,
Scalar priorVariance = 1.0, af::array xControl = af::array(),
96 PropagationMode probMode = PropagationMode::MomentMatching, LogLikType lType = LogLikType::Gaussian, XInit emethod = XInit::pca);
137 virtual void CavityLatents(af::array& mcav, af::array& vcav, af::array& cav1, af::array& cav2);
157 Scalar scaleLogZDyn, af::array& dlogZ_dmProb, af::array& dlogZ_dvProb, af::array& dlogZ_dmt, af::array& dlogZ_dvt,
Scalar& dlogZ_sn);
196 virtual af::array
LogZGradientLatents(
const af::array& cav1,
const af::array& cav2,
const af::array& dmcav_up,
const af::array& dvcav_up,
197 const af::array& dmcav_prev,
const af::array& dvcav_prev,
const af::array& dmcav_next,
const af::array& dvcav_next);
229 friend class boost::serialization::access;
231 template<
class Archive>
232 void serialize(Archive& ar,
unsigned int version)
234 ar& boost::serialization::base_object<SparseDeepGPSSMBaseModel<Scalar>>(*this);
236 ar& BOOST_SERIALIZATION_NVP(dAlpha);
Sparse deep GPSSM via Approximated Expectation Propagation (AEP).
SDGPSSM(const af::array &Y, int latentDimension, std::vector< HiddenLayerDescription > descriptions, Scalar alpha=1.0, Scalar priorMean=0.0, Scalar priorVariance=1.0, af::array xControl=af::array(), PropagationMode probMode=PropagationMode::MomentMatching, LogLikType lType=LogLikType::Gaussian, XInit emethod=XInit::pca)
Constructor.
virtual Scalar ComputePhiPosteriorLatents()
Calculates the phi posterior.
virtual af::array LogZGradientLatents(const af::array &cav1, const af::array &cav2, const af::array &dmcav_up, const af::array &dvcav_up, const af::array &dmcav_prev, const af::array &dvcav_prev, const af::array &dmcav_next, const af::array &dvcav_next)
LogZ gradient w.r.t .
SDGPSSM()
Default Constructor.
virtual af::array PosteriorGradientLatents()
Posterior gradient w.r.t .
Scalar ComputeTiltedTransition(const af::array &mprob, const af::array &vprob, const af::array &mcav_t1, const af::array &vcav_t1, Scalar scaleLogZDyn, af::array &dlogZ_dmProb, af::array &dlogZ_dvProb, af::array &dlogZ_dmt, af::array &dlogZ_dvt, Scalar &dlogZ_sn)
Calculates the tilted transition.
virtual Scalar Function(const af::array &x, af::array &outGradient) override
Cost function the given parameter inputs.
virtual void CavityLatents(af::array &mcav, af::array &vcav, af::array &cav1, af::array &cav2)
Computes the cavity distribution.
SDGPSSM(const af::array &Y, int latentDimension, HiddenLayerDescription description, Scalar alpha=1.0, Scalar priorMean=0.0, Scalar priorVariance=1.0, af::array xControl=af::array(), PropagationMode probMode=PropagationMode::MomentMatching, LogLikType lType=LogLikType::Gaussian, XInit emethod=XInit::pca)
Constructor.
Scalar dAlpha
fraction parameter
virtual Scalar ComputePhiCavityLatents()
Calculates the phi cavity.
virtual af::array CavityGradientLatents(const af::array &cav1, const af::array &cav2)
Cavity gradient w.r.t .
virtual ~SDGPSSM()
Destructor.
virtual Scalar ComputePhiPriorLatents()
Calculates the phi prior.
Base class with abstract and basic function definitions. All deep GP models will be derived from this...
Description of the layer.