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

Public Types

enum  TestMode { CLASSIFICATION_MODE =0, REGRESSION_MODE }
 

Public Member Functions

 TestInstanceResult ()
 
 TestInstanceResult (const TestInstanceResult &rhs)
 
 ~TestInstanceResult ()
 
TestInstanceResultoperator= (const TestInstanceResult &rhs)
 
bool setClassificationResult (const unsigned int testIteration, const unsigned int classLabel, const unsigned int predictedClassLabel, const unsigned int unProcessedPredictedClassLabel, const VectorFloat &classLikelihoods, const VectorFloat &classDistances)
 
bool setRegressionResult (const unsigned int testIteration, const VectorFloat &regressionData, const VectorFloat &targetData)
 
unsigned int getTestMode () const
 
unsigned int getTestIteration () const
 
unsigned int getClassLabel () const
 
unsigned int getPredictedClassLabel () const
 
Float getMaximumLikelihood () const
 
Float getSquaredError () const
 
VectorFloat getClassLikelihoods () const
 
VectorFloat getDistances () const
 

Protected Attributes

unsigned int testMode
 
unsigned int testIteration
 
unsigned int classLabel
 
unsigned int predictedClassLabel
 
unsigned int unProcessedPredictedClassLabel
 
VectorFloat classLikelihoods
 
VectorFloat classDistances
 
VectorFloat regressionData
 
VectorFloat targetData
 

Detailed Description

Definition at line 36 of file TestInstanceResult.h.

Constructor & Destructor Documentation

TestInstanceResult::TestInstanceResult ( )
inline

Default Constructor.

Initializes the TrainingResult instance.

Definition at line 43 of file TestInstanceResult.h.

TestInstanceResult::TestInstanceResult ( const TestInstanceResult rhs)
inline

Copy Constructor.

Initializes this instance by copying the data from the rhs instance

Parameters
constTestInstanceResult &rhs: another instance of the TestInstanceResult class

Definition at line 58 of file TestInstanceResult.h.

TestInstanceResult::~TestInstanceResult ( )
inline

Default Destructor.

Definition at line 65 of file TestInstanceResult.h.

Member Function Documentation

unsigned int TestInstanceResult::getClassLabel ( ) const
inline

Gets the class label. This is only useful in CLASSIFICATION_MODE.

Returns
returns the class label

Definition at line 148 of file TestInstanceResult.h.

VectorFloat TestInstanceResult::getClassLikelihoods ( ) const
inline

Gets the class likelihoods vector. This is only useful in CLASSIFICATION_MODE.

Returns
returns the class likelihoods vector

Definition at line 195 of file TestInstanceResult.h.

VectorFloat TestInstanceResult::getDistances ( ) const
inline

Gets the class distances vector. This is only useful in CLASSIFICATION_MODE.

Returns
returns the class distances vector

Definition at line 204 of file TestInstanceResult.h.

Float TestInstanceResult::getMaximumLikelihood ( ) const
inline

Gets the maximum likelihood. This is only useful in CLASSIFICATION_MODE.

Returns
returns the maximum likelihood

Definition at line 166 of file TestInstanceResult.h.

unsigned int TestInstanceResult::getPredictedClassLabel ( ) const
inline

Gets the predicted class label. This is only useful in CLASSIFICATION_MODE.

Returns
returns the predicted class label

Definition at line 157 of file TestInstanceResult.h.

Float TestInstanceResult::getSquaredError ( ) const
inline

Gets the squared error between the regressionData and the target data. This is only useful in REGRESSION_MODE.

Returns
returns the squared error between the regression estimate and the target data

Definition at line 181 of file TestInstanceResult.h.

unsigned int TestInstanceResult::getTestIteration ( ) const
inline

Gets the test iteration, this represents which test example the test results correspond to.

Returns
returns the test iteration

Definition at line 139 of file TestInstanceResult.h.

unsigned int TestInstanceResult::getTestMode ( ) const
inline

Gets the current test mode, this will be one of the TestMode enums.

Returns
returns the current test mode, this will be one of the TestMode enums

Definition at line 130 of file TestInstanceResult.h.

TestInstanceResult& TestInstanceResult::operator= ( const TestInstanceResult 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
constTestInstanceResult &rhs: another instance of the TestInstanceResult class

Definition at line 76 of file TestInstanceResult.h.

bool TestInstanceResult::setClassificationResult ( const unsigned int  testIteration,
const unsigned int  classLabel,
const unsigned int  predictedClassLabel,
const unsigned int  unProcessedPredictedClassLabel,
const VectorFloat classLikelihoods,
const VectorFloat classDistances 
)
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
Returns
returns true if the training result was set successfully

Definition at line 98 of file TestInstanceResult.h.

bool TestInstanceResult::setRegressionResult ( const unsigned int  testIteration,
const VectorFloat regressionData,
const VectorFloat targetData 
)
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
Returns
returns true if the training result was set successfully

Definition at line 117 of file TestInstanceResult.h.


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