NeuralEngine A Game Engine with embeded Machine Learning algorithms based on Gaussian Processes. |

FgAEPSparseGPR.h
1
11#pragma once
12
13#include <MachineLearning/FgSparseGPBaseModel.h>
14
15 namespace NeuralEngine
16{
17 namespace MachineLearning
18 {
19 namespace GPModels
20 {
21 namespace AEP
22 {
23
49 template<typename Scalar>
50 class NE_IMPEXP SGPR : public SparseGPBaseModel<Scalar>
51 {
52
53 public:
54
66 SGPR(const af::array& Y, const af::array& X, int numInducing = 20, Scalar alpha = 1.0, LogLikType lType = LogLikType::Gaussian);
67
78 virtual Scalar Function(const af::array& x, af::array& outGradient) override;
79
85 SGPR();
86
87 protected:
88
89
90 private:
91 Scalar dAlpha;
92
93 friend class boost::serialization::access;
94
95 template<class Archive>
96 void serialize(Archive& ar, unsigned int version)
97 {
98 ar& boost::serialization::base_object<SparseGPBaseModel<Scalar>>(*this);
99 //ar& boost::serialization::make_nvp("SparseGPBaseModel", boost::serialization::base_object<SparseGPBaseModel<Scalar>>(*this));
100 ar& BOOST_SERIALIZATION_NVP(dAlpha);
101 }
102 };
103 }
104 }
105 }
106}
NeuralEngine::MachineLearning::GPModels::AEP::SGPR
Sparse Gaussian process via Approximated Expectation Propagation (AEP).
Definition: FgAEPSparseGPR.h:51
NeuralEngine::MachineLearning::GPModels::AEP::SGPR::SGPR
SGPR()
Default constructor.
NeuralEngine::MachineLearning::GPModels::AEP::SGPR::Function
virtual Scalar Function(const af::array &x, af::array &outGradient) override
Cost function the given parameter inputs.
NeuralEngine::MachineLearning::GPModels::AEP::SGPR::dAlpha
Scalar dAlpha
fraction parameter
Definition: FgAEPSparseGPR.h:91
NeuralEngine::MachineLearning::GPModels::AEP::SGPR::SGPR
SGPR(const af::array &Y, const af::array &X, int numInducing=20, Scalar alpha=1.0, LogLikType lType=LogLikType::Gaussian)
Constructor.
NeuralEngine::MachineLearning::GPModels::SparseGPBaseModel
Base class for all sparse GP models.
Definition: FgSparseGPBaseModel.h:59
Scalar
NeuralEngine
Definition: NeArray2.h:18