NeuralEngine
A Game Engine with embeded Machine Learning algorithms based on Gaussian Processes.
NeuralEngine::MachineLearning::IModel< Scalar > Class Template Referenceabstract


Base class with abstract and basic function definitions. All models will be derived from this class.
More...

#include <FgIModel.h>

Inheritance diagram for NeuralEngine::MachineLearning::IModel< Scalar >:
Collaboration diagram for NeuralEngine::MachineLearning::IModel< Scalar >:

Public Member Functions

virtual Scalar Function (const af::array &x, af::array &outGradient)
 Cost function the given x inputs. More...
 
virtual int GetNumParameters ()=0
 Gets number of parameters to be optimized. More...
 
virtual void SetParameters (const af::array &param)=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...
 
int GetDataLenght ()
 Gets data lenght. More...
 
int GetDataDimensionality ()
 Gets data dimensionality. More...
 
ModelType GetModelType ()
 Gets model type. More...
 
virtual void SetBatchSize (int size)
 Sets batch size. More...
 
int GetBatchSize ()
 Gets batch size. More...
 
void SetIndexes (af::array &indexes)
 Sets the batch indexes. More...
 

Protected Member Functions

 IModel (int numData, int numDimension, ModelType type)
 Constructor. More...
 

Protected Attributes

ModelType mType
 
int iN
 dataset length More...
 
int iD
 dataset dimension More...
 
int iBatchSize
 size of the batch More...
 
af::array afIndexes
 indexes of /f$\mathbf{X}/f$ for batch learning 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
 

Detailed Description

template<typename Scalar>
class NeuralEngine::MachineLearning::IModel< Scalar >


Base class with abstract and basic function definitions. All models will be derived from this class.

HmetalT, 26.10.2017.

Definition at line 102 of file FgIModel.h.

Constructor & Destructor Documentation

◆ IModel()

template<typename Scalar >
NeuralEngine::MachineLearning::IModel< Scalar >::IModel ( int  numData,
int  numDimension,
ModelType  type 
)
protected

Constructor.

Hmetal T, 16/04/2019.

Parameters
numDataNumber of data samples.
numDimensionNumber of data dimensions.

Member Function Documentation

◆ Function()

◆ GetNumParameters()

◆ SetParameters()

◆ GetParameters()

◆ UpdateParameters()

◆ GetDataLenght()

template<typename Scalar >
int NeuralEngine::MachineLearning::IModel< Scalar >::GetDataLenght ( )

Gets data lenght.

Hmetal T, 16/04/2019.

Returns
The data lenght.

◆ GetDataDimensionality()

template<typename Scalar >
int NeuralEngine::MachineLearning::IModel< Scalar >::GetDataDimensionality ( )

Gets data dimensionality.

Hmetal T, 16/04/2019.

Returns
The data dimensionality.

◆ GetModelType()

template<typename Scalar >
ModelType NeuralEngine::MachineLearning::IModel< Scalar >::GetModelType ( )

Gets model type.

Hmetal T, 16/04/2019.

Returns
The model type.

◆ SetBatchSize()

template<typename Scalar >
virtual void NeuralEngine::MachineLearning::IModel< Scalar >::SetBatchSize ( int  size)
virtual

Sets batch size.

Hmetal T, 16/04/2019.

Parameters
sizeThe size.

◆ GetBatchSize()

template<typename Scalar >
int NeuralEngine::MachineLearning::IModel< Scalar >::GetBatchSize ( )

Gets batch size.

Hmetal T, 16/04/2019.

Returns
The batch size.

◆ SetIndexes()

template<typename Scalar >
void NeuralEngine::MachineLearning::IModel< Scalar >::SetIndexes ( af::array &  indexes)

Sets the batch indexes.

Hmetal T, 31/08/2020.

◆ serialize()

template<typename Scalar >
template<class Archive >
void NeuralEngine::MachineLearning::IModel< Scalar >::serialize ( Archive &  ar,
unsigned int  version 
)
inlineprivate

Definition at line 231 of file FgIModel.h.

Friends And Related Function Documentation

◆ boost::serialization::access

template<typename Scalar >
friend class boost::serialization::access
friend

Definition at line 228 of file FgIModel.h.

Member Data Documentation

◆ mType

template<typename Scalar >
ModelType NeuralEngine::MachineLearning::IModel< Scalar >::mType
protected

Definition at line 218 of file FgIModel.h.

◆ iN

template<typename Scalar >
int NeuralEngine::MachineLearning::IModel< Scalar >::iN
protected

dataset length

Definition at line 220 of file FgIModel.h.

◆ iD

template<typename Scalar >
int NeuralEngine::MachineLearning::IModel< Scalar >::iD
protected

dataset dimension

Definition at line 221 of file FgIModel.h.

◆ iBatchSize

template<typename Scalar >
int NeuralEngine::MachineLearning::IModel< Scalar >::iBatchSize
protected

size of the batch

Definition at line 222 of file FgIModel.h.

◆ afIndexes

template<typename Scalar >
af::array NeuralEngine::MachineLearning::IModel< Scalar >::afIndexes
protected

indexes of /f$\mathbf{X}/f$ for batch learning

Definition at line 223 of file FgIModel.h.

◆ m_dType

template<typename Scalar >
af::dtype NeuralEngine::MachineLearning::IModel< Scalar >::m_dType
protected

floating point precision flag for af::array

Definition at line 225 of file FgIModel.h.


The documentation for this class was generated from the following file: