Abstract class for different GP likelihood layers. More...
#include <FgGPBaseLayer.h>
Public Member Functions | |
GPBaseLayer (int numPoints, int outputDim, int inputDim) | |
Constructor. More... | |
virtual | ~GPBaseLayer () |
Destructor. More... | |
IKernel< Scalar > * | GetKernel () |
Gets the kernel function. More... | |
void | SetKernel (IKernel< Scalar > *kern) |
Sets a kernel function. More... | |
virtual void | InitParameters (af::array *X=nullptr) |
virtual int | GetNumParameters () |
Gets number of parameters to be optimized. More... | |
virtual void | SetParameters (const af::array ¶m) |
Sets the parameters for each optimization iteration. More... | |
virtual af::array | GetParameters () |
Gets the parameters for each optimization iteration. More... | |
virtual void | ForwardPredictionPost (const af::array *mx, const af::array *vx, af::array &mout, af::array &vout) |
Forward prediction of posterior function values. More... | |
virtual void | SampleFromPost (const af::array &inX, af::array &outfsample) |
Samples from posterior. More... | |
virtual void | FixKernelParameters (bool isfixed) |
Sets fixation for hyperparameters. More... | |
virtual void | UpdateParameters () |
Updates the parameters. More... | |
virtual void | SetDataSize (int length, int dimension) override |
Sets data size. More... | |
void | SetStyles (std::map< std::string, Style< Scalar > > *styles) |
Sets the syles. More... | |
void | SetLatentDimension (int q) |
Sets latent dimension. More... | |
![]() | |
ILayer (LayerType type, int numPoints, int outputDim) | |
Constructor. More... | |
virtual | ~ILayer ()=default |
Destructor. More... | |
LayerType | GetType () |
Gets the layer type. More... | |
virtual int | GetNumParameters ()=0 |
Gets number of parameters to be optimized. More... | |
virtual void | SetParameters (const af::array ¶m)=0 |
Sets the parameters for each optimization iteration. More... | |
virtual af::array | GetParameters ()=0 |
Gets the parameters for each optimization iteration. More... | |
virtual void | UpdateParameters ()=0 |
Updates the parameters. More... | |
virtual void | SetDataSize (int length, int dimension) |
Sets data size. More... | |
Protected Member Functions | |
GPBaseLayer () | |
Default constructor. More... | |
virtual void | ReinitParameters () |
Reinitializes the parameters. More... | |
![]() | |
ILayer () | |
Default constructor. More... | |
Protected Attributes | |
int | iq |
Latent dimension. More... | |
bool | isFixedHypers |
IKernel< Scalar > * | kernel |
kernel function More... | |
std::map< std::string, Style< Scalar > > * | mStyles |
style variable More... | |
Scalar | JITTER |
for kernel matrix stability (positive definiteness) More... | |
![]() | |
int | iD |
data dimension More... | |
int | iN |
data size More... | |
LayerType | lType |
liklihood or gp layer More... | |
af::dtype | m_dType |
floating point precision flag for af::array More... | |
Private Member Functions | |
template<class Archive > | |
void | serialize (Archive &ar, unsigned int version) |
Friends | |
class | boost::serialization::access |
Abstract class for different GP likelihood layers.
, 27.02.2018.
Definition at line 29 of file FgGPBaseLayer.h.
NeuralEngine::MachineLearning::GPModels::GPBaseLayer< Scalar >::GPBaseLayer | ( | int | numPoints, |
int | outputDim, | ||
int | inputDim | ||
) |
Constructor.
, 26.04.2018.
numPoints | Number of training points. |
outputDim | The output dimension. |
inputDim | The input dimension. |
|
virtual |
Destructor.
, 26.04.2018.
|
inlineprotected |
IKernel< Scalar > * NeuralEngine::MachineLearning::GPModels::GPBaseLayer< Scalar >::GetKernel | ( | ) |
Gets the kernel function.
, 26.04.2018.
void NeuralEngine::MachineLearning::GPModels::GPBaseLayer< Scalar >::SetKernel | ( | IKernel< Scalar > * | kern | ) |
Sets a kernel function.
, 26.04.2018.
kernel | [in,out] If non-null, the kernel. |
|
virtual |
|
virtual |
Gets number of parameters to be optimized.
, 26.06.2018.
Implements NeuralEngine::MachineLearning::ILayer< Scalar >.
Reimplemented in NeuralEngine::MachineLearning::GPModels::SparseGPBaseLayer< Scalar >.
|
virtual |
Sets the parameters for each optimization iteration.
, 26.06.2018.
param | The parameter. |
Implements NeuralEngine::MachineLearning::ILayer< Scalar >.
Reimplemented in NeuralEngine::MachineLearning::GPModels::SparseGPBaseLayer< Scalar >.
|
virtual |
Gets the parameters for each optimization iteration.
, 26.06.2018.
Implements NeuralEngine::MachineLearning::ILayer< Scalar >.
Reimplemented in NeuralEngine::MachineLearning::GPModels::SparseGPBaseLayer< Scalar >.
|
virtual |
Forward prediction of posterior function values.
, 12.06.2018.
mout | [in,out] The m^{ }_{f}. |
vout | [in,out] The V^{ }_{ff}. |
mx | [in,out] The inputs mx. |
vx | [in,out] (Optional) If non-null, the variances vx. |
Reimplemented in NeuralEngine::MachineLearning::GPModels::PowerEP::SGPLayer2nd< Scalar >, and NeuralEngine::MachineLearning::GPModels::SparseGPBaseLayer< Scalar >.
|
virtual |
Samples from posterior.
, 12.06.2018.
vx | [in,out] (Optional) If non-null, the variances vx. |
mx | [in,out] The inputs mx. |
fsample | [in,out] The m^{ }_{f}. |
inX | The V^{ }_{ff}. |
Reimplemented in NeuralEngine::MachineLearning::GPModels::SparseGPBaseLayer< Scalar >.
|
virtual |
Sets fixation for hyperparameters.
Hmetal T, 16/12/2019.
isfixed | True if isfixed. |
|
virtual |
Updates the parameters.
, 26.06.2018.
Implements NeuralEngine::MachineLearning::ILayer< Scalar >.
Reimplemented in NeuralEngine::MachineLearning::GPModels::AEP::SGPLayer< Scalar >, NeuralEngine::MachineLearning::GPModels::PowerEP::SGPLayer< Scalar >, NeuralEngine::MachineLearning::GPModels::PowerEP::SGPLayer2nd< Scalar >, and NeuralEngine::MachineLearning::GPModels::SparseGPBaseLayer< Scalar >.
|
overridevirtual |
Sets data size.
Hmetal T, 03/09/2020.
length | The length. |
dimension | The dimension. |
Reimplemented from NeuralEngine::MachineLearning::ILayer< Scalar >.
void NeuralEngine::MachineLearning::GPModels::GPBaseLayer< Scalar >::SetStyles | ( | std::map< std::string, Style< Scalar > > * | styles | ) |
Sets the syles.
Hmetal T, 25/09/2020.
styles | [in,out] If non-null, the styles. |
void NeuralEngine::MachineLearning::GPModels::GPBaseLayer< Scalar >::SetLatentDimension | ( | int | q | ) |
Sets latent dimension.
Hmetal T, 28/06/2022.
q | An int to process. |
|
protectedvirtual |
Reinitializes the parameters.
Hmetal T, 03/09/2020.
Reimplemented in NeuralEngine::MachineLearning::GPModels::SparseGPBaseLayer< Scalar >.
|
inlineprivate |
Definition at line 196 of file FgGPBaseLayer.h.
|
friend |
Definition at line 193 of file FgGPBaseLayer.h.
|
protected |
Latent dimension.
Definition at line 183 of file FgGPBaseLayer.h.
|
protected |
Definition at line 185 of file FgGPBaseLayer.h.
|
protected |
kernel function
Definition at line 187 of file FgGPBaseLayer.h.
|
protected |
style variable
Definition at line 188 of file FgGPBaseLayer.h.
|
protected |
for kernel matrix stability (positive definiteness)
Definition at line 190 of file FgGPBaseLayer.h.