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


Back-constraints via Periodic topological constraint.
More...

#include <FgPeriodicTopologicalConstraint.h>

Inheritance diagram for NeuralEngine::MachineLearning::GPModels::PTC< Scalar >:
Collaboration diagram for NeuralEngine::MachineLearning::GPModels::PTC< Scalar >:

Public Member Functions

 PTC ()
 Default constructor. More...
 
virtual ~PTC ()
 Destructor. More...
 
virtual void Init (const af::array &Y, const af::array &X, const af::array &segments)
 Initializes this object. More...
 
virtual int GetNumParameters ()
 Gets number of to be optimized parameters. More...
 
virtual void SetParameters (const af::array &param)
 Sets the parameters. More...
 
virtual af::array GetParameters ()
 Gets the parameters. More...
 
virtual af::array GetConstraintX ()
 Gets constraint x coordinates. More...
 
virtual af::array BackconstraintGradient (const af::array &gX)
 Back-constraint gradient. More...
 
- Public Member Functions inherited from NeuralEngine::MachineLearning::GPModels::IBackconstraint< Scalar >
 IBackconstraint (BackConstType type)
 Constructor. More...
 
virtual ~IBackconstraint ()
 Destructor. More...
 
virtual void Init (const af::array &Y, const af::array &X, const af::array &segments)=0
 Initializes this object. More...
 
virtual int GetNumParameters ()=0
 Gets number of to be optimized parameters. More...
 
virtual void SetParameters (const af::array &param)=0
 Sets the parameters. More...
 
virtual af::array GetParameters ()=0
 Gets the parameters. More...
 
virtual af::array GetConstraintX ()=0
 Gets constraint x coordinates. More...
 
virtual af::array BackconstraintGradient (const af::array &gX)=0
 Back-constraint gradient. More...
 
BackConstType GetType ()
 Gets the back-constraint type. More...
 

Protected Attributes

af::array afA
 
std::vector< intpSegments
 
int iNumSegments
 
- Protected Attributes inherited from NeuralEngine::MachineLearning::GPModels::IBackconstraint< Scalar >
int iN
 dataset length More...
 
int iq
 latent dimension 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::GPModels::PTC< Scalar >


Back-constraints via Periodic topological constraint.


For PTC the content vectors are restricted to lie on a unit circle. The low-dimensional coordinates are parameterized by a phase parameter \(\phi_t\), such that \(\mathbf{x}_t = [\cos \phi_t, \sin\phi_t]^T\). Phase is linear as a function of time, parameterized by offset \(\phi_0\) and step-size \(\Delta\phi: \phi_t = \phi_0 + t\Delta\phi\). Each sequence is then parameterized only by \(\phi_0\) and \(\Delta\phi\). The step-size accounts for the different frequencies of different gaits.

Reference:

HmetalT, 26.10.2017.

Definition at line 53 of file FgPeriodicTopologicalConstraint.h.

Constructor & Destructor Documentation

◆ PTC()

Default constructor.

Hmetal T, 17/09/2020.

◆ ~PTC()

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

Destructor.

Hmetal T, 17/09/2020.

Member Function Documentation

◆ Init()

template<typename Scalar >
virtual void NeuralEngine::MachineLearning::GPModels::PTC< Scalar >::Init ( const af::array &  Y,
const af::array &  X,
const af::array &  segments 
)
virtual

Initializes this object.

Hmetal T, 17/09/2020.

Parameters
YAn af::array to process.
XAn af::array to process.

Implements NeuralEngine::MachineLearning::GPModels::IBackconstraint< Scalar >.

◆ GetNumParameters()

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

Gets number of to be optimized parameters.

Hmetal T, 17/09/2020.

Returns
The number parameters.

Implements NeuralEngine::MachineLearning::GPModels::IBackconstraint< Scalar >.

◆ SetParameters()

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

Sets the parameters.

Hmetal T, 17/09/2020.

Parameters
paramThe parameter.

Implements NeuralEngine::MachineLearning::GPModels::IBackconstraint< Scalar >.

◆ GetParameters()

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

Gets the parameters.

Hmetal T, 17/09/2020.

Returns
The parameters.

Implements NeuralEngine::MachineLearning::GPModels::IBackconstraint< Scalar >.

◆ GetConstraintX()

template<typename Scalar >
virtual af::array NeuralEngine::MachineLearning::GPModels::PTC< Scalar >::GetConstraintX ( )
virtual

Gets constraint x coordinates.

Hmetal T, 17/09/2020.

Returns
The constraint x coordinate.

Implements NeuralEngine::MachineLearning::GPModels::IBackconstraint< Scalar >.

◆ BackconstraintGradient()

template<typename Scalar >
virtual af::array NeuralEngine::MachineLearning::GPModels::PTC< Scalar >::BackconstraintGradient ( const af::array &  gX)
virtual

Back-constraint gradient.

Hmetal T, 17/09/2020.

Parameters
gXThe gradient of \(\mathbf{X}\).
Returns
The gradient of the back-constraint.

Implements NeuralEngine::MachineLearning::GPModels::IBackconstraint< Scalar >.

◆ serialize()

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

Definition at line 138 of file FgPeriodicTopologicalConstraint.h.

Friends And Related Function Documentation

◆ boost::serialization::access

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

Definition at line 135 of file FgPeriodicTopologicalConstraint.h.

Member Data Documentation

◆ afA

template<typename Scalar >
af::array NeuralEngine::MachineLearning::GPModels::PTC< Scalar >::afA
protected

Definition at line 129 of file FgPeriodicTopologicalConstraint.h.

◆ pSegments

template<typename Scalar >
std::vector<int> NeuralEngine::MachineLearning::GPModels::PTC< Scalar >::pSegments
protected

Definition at line 130 of file FgPeriodicTopologicalConstraint.h.

◆ iNumSegments

template<typename Scalar >
int NeuralEngine::MachineLearning::GPModels::PTC< Scalar >::iNumSegments
protected

Definition at line 132 of file FgPeriodicTopologicalConstraint.h.


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