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

FgKernelBasedRegression.h
1
11#pragma once
12
13#include <MachineLearning/FgIBackconstraint.h>
14#include <MachineLearning/FgKernels.h>
15
16 namespace NeuralEngine
17{
18 namespace MachineLearning
19 {
20 namespace GPModels
21 {
66 template<typename Scalar>
67 class NE_IMPEXP KBR : public IBackconstraint<Scalar>
68 {
69 public:
70
76 KBR();
77
83 virtual ~KBR();
84
93 virtual void Init(const af::array& Y, const af::array& X, const af::array& segments);
94
102 virtual int GetNumParameters();
103
111 virtual void SetParameters(const af::array& param);
112
120 virtual af::array GetParameters();
121
129 virtual af::array GetConstraintX();
130
140 virtual af::array BackconstraintGradient(const af::array& gX);
141
149 virtual void SetKernel(IKernel<Scalar>* inKernel);
150
158 virtual IKernel<Scalar>* GetKernel();
159
160 protected:
161
162 af::array afA;
163 af::array afK;
164 IKernel<Scalar>* kernel;
165
166 private:
167 friend class boost::serialization::access;
168
169 template<class Archive>
170 void serialize(Archive& ar, unsigned int version)
171 {
172 ar& boost::serialization::base_object<IBackconstraint<Scalar>>(*this);
173
174 ar& BOOST_SERIALIZATION_NVP(afA);
175 ar& BOOST_SERIALIZATION_NVP(afK);
176 ar& BOOST_SERIALIZATION_NVP(kernel);
177 }
178 };
179 }
180 }
181}
NeuralEngine::MachineLearning::GPModels::IBackconstraint
Abstract class for back-constraints, a kind of prior knowledge to force topological positions of unce...
Definition: FgIBackconstraint.h:42
NeuralEngine::MachineLearning::GPModels::KBR
Back-constraints via kernel based regression.
Definition: FgKernelBasedRegression.h:68
NeuralEngine::MachineLearning::GPModels::KBR::SetParameters
virtual void SetParameters(const af::array &param)
Sets the parameters.
NeuralEngine::MachineLearning::GPModels::KBR::afA
af::array afA
parameters
Definition: FgKernelBasedRegression.h:162
NeuralEngine::MachineLearning::GPModels::KBR::kernel
IKernel< Scalar > * kernel
kernel function
Definition: FgKernelBasedRegression.h:164
NeuralEngine::MachineLearning::GPModels::KBR::KBR
KBR()
Default constructor.
NeuralEngine::MachineLearning::GPModels::KBR::GetParameters
virtual af::array GetParameters()
Gets the parameters.
NeuralEngine::MachineLearning::GPModels::KBR::GetNumParameters
virtual int GetNumParameters()
Gets number of to be optimized parameters.
NeuralEngine::MachineLearning::GPModels::KBR::Init
virtual void Init(const af::array &Y, const af::array &X, const af::array &segments)
Initializes this object.
NeuralEngine::MachineLearning::GPModels::KBR::GetKernel
virtual IKernel< Scalar > * GetKernel()
Gets the kernel function.
NeuralEngine::MachineLearning::GPModels::KBR::GetConstraintX
virtual af::array GetConstraintX()
Gets constraint x coordinates.
NeuralEngine::MachineLearning::GPModels::KBR::~KBR
virtual ~KBR()
Destructor.
NeuralEngine::MachineLearning::GPModels::KBR::BackconstraintGradient
virtual af::array BackconstraintGradient(const af::array &gX)
Back-constraint gradient.
NeuralEngine::MachineLearning::GPModels::KBR::afK
af::array afK
kernel matrix
Definition: FgKernelBasedRegression.h:163
NeuralEngine::MachineLearning::GPModels::KBR::SetKernel
virtual void SetKernel(IKernel< Scalar > *inKernel)
Sets a kernel function.
NeuralEngine::MachineLearning::IKernel
Definition: FgIKernel.h:36
NeuralEngine
Definition: NeArray2.h:18