GestureRecognitionToolkit  Version: 0.1.0
The Gesture Recognition Toolkit (GRT) is a cross-platform, open-source, c++ machine learning library for real-time gesture recognition.
GRT::TrainingResult Class Reference

Public Types

enum  TrainingMode { CLASSIFICATION_MODE =0, REGRESSION_MODE }
 

Public Member Functions

 TrainingResult ()
 
 TrainingResult (const TrainingResult &rhs)
 
 ~TrainingResult ()
 
TrainingResultoperator= (const TrainingResult &rhs)
 
unsigned int getTrainingMode () const
 
unsigned int getTrainingIteration () const
 
Float getAccuracy () const
 
Float getTotalSquaredTrainingError () const
 
Float getRootMeanSquaredTrainingError () const
 
MLBasegetTrainer () const
 
bool setClassificationResult (unsigned int trainingIteration, Float accuracy, MLBase *trainer)
 
bool setRegressionResult (unsigned int trainingIteration, Float totalSquaredTrainingError, Float rootMeanSquaredTrainingError, MLBase *trainer)
 

Protected Attributes

unsigned int trainingMode
 
unsigned int trainingIteration
 
Float accuracy
 
Float totalSquaredTrainingError
 
Float rootMeanSquaredTrainingError
 
MLBasetrainer
 

Detailed Description

Definition at line 17 of file TrainingResult.h.

Constructor & Destructor Documentation

GRT::TrainingResult::TrainingResult ( )
inline

Default Constructor.

Initializes the TrainingResult instance.

Definition at line 24 of file TrainingResult.h.

GRT::TrainingResult::TrainingResult ( const TrainingResult rhs)
inline

Copy Constructor.

Initializes this instance by copying the data from the rhs instance

Parameters
constTrainingResult &rhs: another instance of the TrainingResult class

Definition at line 40 of file TrainingResult.h.

GRT::TrainingResult::~TrainingResult ( )
inline

Default Destructor.

Definition at line 47 of file TrainingResult.h.

Member Function Documentation

Float GRT::TrainingResult::getAccuracy ( ) const
inline

Gets the accuracy for the training result at the current training iteration. This is only used if the trainingMode is in CLASSIFICATION_MODE.

Returns
returns the accuracy

Definition at line 94 of file TrainingResult.h.

Float GRT::TrainingResult::getRootMeanSquaredTrainingError ( ) const
inline

Gets the root mean squared error for the training data at the current training iteration. This is only used if the trainingMode is in REGRESSION_MODE.

Returns
returns the rootMeanSquaredTrainingError

Definition at line 114 of file TrainingResult.h.

Float GRT::TrainingResult::getTotalSquaredTrainingError ( ) const
inline

Gets the total squared error for the training data at the current training iteration. This is only used if the trainingMode is in REGRESSION_MODE.

Returns
returns the totalSquaredTrainingError

Definition at line 104 of file TrainingResult.h.

MLBase* GRT::TrainingResult::getTrainer ( ) const
inline

Gets a pointer to the class used for training.

Returns
returns a pointer to the trainer

Definition at line 123 of file TrainingResult.h.

unsigned int GRT::TrainingResult::getTrainingIteration ( ) const
inline

Gets the training iteration, this represents which iteration (or epoch) the training results correspond to.

Returns
returns the training iteration

Definition at line 84 of file TrainingResult.h.

unsigned int GRT::TrainingResult::getTrainingMode ( ) const
inline

Gets the current training mode, this will be one of the TrainingMode enums.

Returns
returns the current training mode, this will be one of the TrainingMode enums

Definition at line 75 of file TrainingResult.h.

TrainingResult& GRT::TrainingResult::operator= ( const TrainingResult rhs)
inline

Defines the Equals Operator.

This copies the data from the rhs instance to this instance, returning a reference to the current instance.

Parameters
constTrainingResult &rhs: another instance of the TrainingResult class

Definition at line 58 of file TrainingResult.h.

bool GRT::TrainingResult::setClassificationResult ( unsigned int  trainingIteration,
Float  accuracy,
MLBase trainer 
)
inline

Sets the training result for classification data. This will place the training mode into CLASSIFICATION_MODE.

Parameters
trainingIterationthe current training iteration (or epoch)
accuracythe accuracy for the current training iteration
trainera pointer to the class used to generate the result
Returns
returns true if the training result was set successfully

Definition at line 135 of file TrainingResult.h.

bool GRT::TrainingResult::setRegressionResult ( unsigned int  trainingIteration,
Float  totalSquaredTrainingError,
Float  rootMeanSquaredTrainingError,
MLBase trainer 
)
inline

Sets the training result for regression data. This will place the training mode into REGRESSION_MODE.

Parameters
trainingIterationthe current training iteration (or epoch)
totalSquaredTrainingErrorthe total squared training error for the current iteration
rootMeanSquaredTrainingErrorthe root mean squared training error for the current iteration
trainera pointer to the class used to generate the result
Returns
returns true if the training result was set successfully

Definition at line 152 of file TrainingResult.h.


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