NeuralEngine
A Game Engine with embeded Machine Learning algorithms based on Gaussian Processes.
FgSparseDeepGPBaseModel.h
1
11#pragma once
12
13#include <MachineLearning/FgDeepGPBaseModel.h>
14
15namespace NeuralEngine
16{
17 namespace MachineLearning
18 {
19 namespace GPModels
20 {
21
30 template<typename Scalar>
31 class NE_IMPEXP SparseDeepGPBaseModel : public DeepGPBaseModel<Scalar>
32 {
33 public:
34
45 SparseDeepGPBaseModel(const af::array& Y, const af::array& X, HiddenLayerDescription hiddenLayerdescription, LogLikType lType = LogLikType::Gaussian);
46
57 SparseDeepGPBaseModel(const af::array& Y, const af::array& X, std::vector<HiddenLayerDescription> hiddenLayerdescriptions, LogLikType lType = LogLikType::Gaussian);
58
66
73
81 virtual bool Init() override;
82
90 af::array GetTrainingInputs();
91
99 virtual void FixInducing(bool isfixed);
100
101 protected:
102 int iq; //< latent dimension
103 af::array afX; //< training inputs
104
105 private:
106 friend class boost::serialization::access;
107
108 template<class Archive>
109 void serialize(Archive& ar, unsigned int version)
110 {
111 ar& boost::serialization::base_object<DeepGPBaseModel<Scalar>>(*this);
112
113 //ar& boost::serialization::make_nvp("DeepGPBaseModel", boost::serialization::base_object<DeepGPBaseModel<Scalar>>(*this));
114
115 ar& BOOST_SERIALIZATION_NVP(iq);
116 ar& BOOST_SERIALIZATION_NVP(afX);
117 }
118 };
119 }
120 }
121}
Base class with abstract and basic function definitions. All deep GP models will be derived from this...
Base class with abstract and basic function definitions. All deep GP models will be derived from this...
SparseDeepGPBaseModel(const af::array &Y, const af::array &X, HiddenLayerDescription hiddenLayerdescription, LogLikType lType=LogLikType::Gaussian)
Constructor.
virtual void FixInducing(bool isfixed)
Set fixation for inducing inputs.
virtual bool Init() override
Initializes the model.
SparseDeepGPBaseModel(const af::array &Y, const af::array &X, std::vector< HiddenLayerDescription > hiddenLayerdescriptions, LogLikType lType=LogLikType::Gaussian)
Constructor.