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

Style variable. More...

#include <FgGPLVMBaseModel.h>

Collaboration diagram for NeuralEngine::MachineLearning::GPModels::Style< Scalar >:

Public Member Functions

 Style (std::string name)
 Default constructor. More...
 
 Style ()
 Default constructor. More...
 
virtual ~Style ()
 Destructor. More...
 
virtual void AddSubstyle (std::string name, int numFrames)
 Adds a sub-style. More...
 
virtual int GetNumSubstyles ()
 Gets number of sub-styles. More...
 
virtual int GetNumInducingSubstyles ()
 Gets number of inducing sub-styles. More...
 
af::array GetStyle ()
 Gets the style variable. More...
 
std::map< std::string, intGetSubstyles ()
 Gets the sub-styles. More...
 
af::array GetStyleExpanded ()
 Gets style variable expanded to match associated /f$\matchbf{x}$/f. More...
 
af::array GetInducingStyleExpanded ()
 Gets inducing style expanded. More...
 
const af::array GetStyleIndex ()
 Gets style index. More...
 
void SetInducingStyleIndex (const af::array &indx)
 Sets inducing style index. More...
 
void GetFactorsExpanded (af::array &X1, af::array &X2)
 Gets factor x coordinate 1. More...
 
std::string GetName ()
 Gets the name of the style. More...
 
int GetNumParameters ()
 Gets number parameters. More...
 
int GetNumInducingParameters ()
 Gets number of inducing parameters. More...
 
af::array GetParameters ()
 Gets the parameters. More...
 
void SetParameters (const af::array &param)
 Sets the parameters. More...
 
af::array GetInducingParameters ()
 Gets inducing parameters. More...
 
void SetInducingParameters (const af::array &param)
 Sets inducing parameters. More...
 
void UpdatePosterior (const af::array &postX1, const af::array &postX2)
 Updates the parameters. More...
 
af::array GetGradientCollapsed (const af::array &factorGradient)
 Gets gradient collapsed. More...
 
af::array GetInducingGradientCollapsed (const af::array &styleGradient)
 Gets style inducing gradient collapsed. More...
 
void InitFactors (const af::array &expandedX1, const af::array &expandedX2)
 Initializes the factors. More...
 

Protected Attributes

af::array afStyleIdx
 
af::array afStyleInducingIdx
 
af::array afStyle
 
af::array afInducingStyle
 
af::array afFactorX1
 
af::array afFactorX2
 
af::array afPosteriorX1
 
af::array afPosteriorX2
 
std::map< std::string, intmSubStyles
 
std::string sName
 
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::GPModels::Style< Scalar >

Style variable.

Hmetal T, 25/09/2020.

Template Parameters
ScalarType of the scalar.

Definition at line 32 of file FgGPLVMBaseModel.h.

Constructor & Destructor Documentation

◆ Style() [1/2]

template<typename Scalar >
NeuralEngine::MachineLearning::GPModels::Style< Scalar >::Style ( std::string  name)

Default constructor.

Hmetal T, 25/09/2020.

Parameters
nameThe name of the style.

◆ Style() [2/2]

template<typename Scalar >
NeuralEngine::MachineLearning::GPModels::Style< Scalar >::Style ( )
inline

Default constructor.

Hmetal T, 21/03/2021.

Definition at line 50 of file FgGPLVMBaseModel.h.

◆ ~Style()

template<typename Scalar >
virtual NeuralEngine::MachineLearning::GPModels::Style< Scalar >::~Style ( )
virtual

Destructor.

Hmetal T, 25/09/2020.

Member Function Documentation

◆ AddSubstyle()

template<typename Scalar >
virtual void NeuralEngine::MachineLearning::GPModels::Style< Scalar >::AddSubstyle ( std::string  name,
int  numFrames 
)
virtual

Adds a sub-style.

Hmetal T, 25/09/2020.

Parameters
nameThe name of the sub-style.
numFramesNumber of frames.

◆ GetNumSubstyles()

template<typename Scalar >
virtual int NeuralEngine::MachineLearning::GPModels::Style< Scalar >::GetNumSubstyles ( )
virtual

Gets number of sub-styles.

Hmetal T, 25/09/2020.

Returns
The number substyles.

◆ GetNumInducingSubstyles()

template<typename Scalar >
virtual int NeuralEngine::MachineLearning::GPModels::Style< Scalar >::GetNumInducingSubstyles ( )
virtual

Gets number of inducing sub-styles.

Hmetal T, 25/09/2020.

Returns
The number substyles.

◆ GetStyle()

template<typename Scalar >
af::array NeuralEngine::MachineLearning::GPModels::Style< Scalar >::GetStyle ( )

Gets the style variable.

Hmetal T, 25/09/2020.

Returns
The style.

◆ GetSubstyles()

template<typename Scalar >
std::map< std::string, int > NeuralEngine::MachineLearning::GPModels::Style< Scalar >::GetSubstyles ( )

Gets the sub-styles.

Hmetal T, 25/09/2020.

Returns
Null if it fails, else the sub-style names and associated indexes.

◆ GetStyleExpanded()

template<typename Scalar >
af::array NeuralEngine::MachineLearning::GPModels::Style< Scalar >::GetStyleExpanded ( )

Gets style variable expanded to match associated /f$\matchbf{x}$/f.

Hmetal T, 25/09/2020.

Returns
The style expanded.

◆ GetInducingStyleExpanded()

template<typename Scalar >
af::array NeuralEngine::MachineLearning::GPModels::Style< Scalar >::GetInducingStyleExpanded ( )

Gets inducing style expanded.

Hmetal T, 09/11/2020.

Returns
The inducing style expanded.

◆ GetStyleIndex()

template<typename Scalar >
const af::array NeuralEngine::MachineLearning::GPModels::Style< Scalar >::GetStyleIndex ( )

Gets style index.

Hmetal T, 28/09/2020.

Returns
The style index.

◆ SetInducingStyleIndex()

template<typename Scalar >
void NeuralEngine::MachineLearning::GPModels::Style< Scalar >::SetInducingStyleIndex ( const af::array &  indx)

Sets inducing style index.

Hmetal T, 06/11/2020.

Parameters
indxThe indx.

◆ GetFactorsExpanded()

template<typename Scalar >
void NeuralEngine::MachineLearning::GPModels::Style< Scalar >::GetFactorsExpanded ( af::array &  X1,
af::array &  X2 
)

Gets factor x coordinate 1.

Hmetal T, 28/09/2020.

Returns
The factor x coordinate 1.

◆ GetName()

template<typename Scalar >
std::string NeuralEngine::MachineLearning::GPModels::Style< Scalar >::GetName ( )

Gets the name of the style.

Hmetal T, 25/09/2020.

Returns
The name.

◆ GetNumParameters()

template<typename Scalar >
int NeuralEngine::MachineLearning::GPModels::Style< Scalar >::GetNumParameters ( )

Gets number parameters.

Hmetal T, 25/09/2020.

Returns
The number parameters.

◆ GetNumInducingParameters()

template<typename Scalar >
int NeuralEngine::MachineLearning::GPModels::Style< Scalar >::GetNumInducingParameters ( )

Gets number of inducing parameters.

Hmetal T, 06/11/2020.

Returns
The number inducing parameters.

◆ GetParameters()

template<typename Scalar >
af::array NeuralEngine::MachineLearning::GPModels::Style< Scalar >::GetParameters ( )

Gets the parameters.

Hmetal T, 25/09/2020.

Returns
The parameters.

◆ SetParameters()

template<typename Scalar >
void NeuralEngine::MachineLearning::GPModels::Style< Scalar >::SetParameters ( const af::array &  param)

Sets the parameters.

Hmetal T, 25/09/2020.

Parameters
param[in,out] The parameter.

◆ GetInducingParameters()

template<typename Scalar >
af::array NeuralEngine::MachineLearning::GPModels::Style< Scalar >::GetInducingParameters ( )

Gets inducing parameters.

Hmetal T, 09/11/2020.

Returns
The inducing parameters.

◆ SetInducingParameters()

template<typename Scalar >
void NeuralEngine::MachineLearning::GPModels::Style< Scalar >::SetInducingParameters ( const af::array &  param)

Sets inducing parameters.

Hmetal T, 09/11/2020.

Parameters
paramThe parameter.

◆ UpdatePosterior()

template<typename Scalar >
void NeuralEngine::MachineLearning::GPModels::Style< Scalar >::UpdatePosterior ( const af::array &  postX1,
const af::array &  postX2 
)

Updates the parameters.

Hmetal T, 28/09/2020.

◆ GetGradientCollapsed()

template<typename Scalar >
af::array NeuralEngine::MachineLearning::GPModels::Style< Scalar >::GetGradientCollapsed ( const af::array &  factorGradient)

Gets gradient collapsed.

Hmetal T, 28/09/2020.

Parameters
factorFradient[in,out] The factor fradient.
Returns
The gradient collapsed.

◆ GetInducingGradientCollapsed()

template<typename Scalar >
af::array NeuralEngine::MachineLearning::GPModels::Style< Scalar >::GetInducingGradientCollapsed ( const af::array &  styleGradient)

Gets style inducing gradient collapsed.

HmetalT, 06/11/2020.

Parameters
styleGradientThe style gradient.
Returns
The inducing gradient collapsed.

◆ InitFactors()

template<typename Scalar >
void NeuralEngine::MachineLearning::GPModels::Style< Scalar >::InitFactors ( const af::array &  expandedX1,
const af::array &  expandedX2 
)

Initializes the factors.

Hmetal T, 28/09/2020.

Parameters
expandedX1[in,out] The first expanded x coordinate.
expandedX1[in,out] The first expanded x coordinate.

◆ serialize()

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

Definition at line 271 of file FgGPLVMBaseModel.h.

Friends And Related Function Documentation

◆ boost::serialization::access

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

Definition at line 268 of file FgGPLVMBaseModel.h.

Member Data Documentation

◆ afStyleIdx

template<typename Scalar >
af::array NeuralEngine::MachineLearning::GPModels::Style< Scalar >::afStyleIdx
protected

Definition at line 253 of file FgGPLVMBaseModel.h.

◆ afStyleInducingIdx

template<typename Scalar >
af::array NeuralEngine::MachineLearning::GPModels::Style< Scalar >::afStyleInducingIdx
protected

Definition at line 254 of file FgGPLVMBaseModel.h.

◆ afStyle

template<typename Scalar >
af::array NeuralEngine::MachineLearning::GPModels::Style< Scalar >::afStyle
protected

Definition at line 255 of file FgGPLVMBaseModel.h.

◆ afInducingStyle

template<typename Scalar >
af::array NeuralEngine::MachineLearning::GPModels::Style< Scalar >::afInducingStyle
protected

Definition at line 256 of file FgGPLVMBaseModel.h.

◆ afFactorX1

template<typename Scalar >
af::array NeuralEngine::MachineLearning::GPModels::Style< Scalar >::afFactorX1
protected

Definition at line 257 of file FgGPLVMBaseModel.h.

◆ afFactorX2

template<typename Scalar >
af::array NeuralEngine::MachineLearning::GPModels::Style< Scalar >::afFactorX2
protected

Definition at line 258 of file FgGPLVMBaseModel.h.

◆ afPosteriorX1

template<typename Scalar >
af::array NeuralEngine::MachineLearning::GPModels::Style< Scalar >::afPosteriorX1
protected

Definition at line 259 of file FgGPLVMBaseModel.h.

◆ afPosteriorX2

template<typename Scalar >
af::array NeuralEngine::MachineLearning::GPModels::Style< Scalar >::afPosteriorX2
protected

Definition at line 260 of file FgGPLVMBaseModel.h.

◆ mSubStyles

template<typename Scalar >
std::map<std::string, int> NeuralEngine::MachineLearning::GPModels::Style< Scalar >::mSubStyles
protected

Definition at line 261 of file FgGPLVMBaseModel.h.

◆ sName

template<typename Scalar >
std::string NeuralEngine::MachineLearning::GPModels::Style< Scalar >::sName
protected

Definition at line 263 of file FgGPLVMBaseModel.h.

◆ m_dType

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

floating point precision flag for af::array

Definition at line 265 of file FgGPLVMBaseModel.h.


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