![]() |
GestureRecognitionToolkit
Version: 1.0 Revision: 04-03-15
The Gesture Recognition Toolkit (GRT) is a cross-platform, open-source, c++ machine learning library for real-time gesture recognition.
|
Public Types | |
enum | ContextLevels { START_OF_PIPELINE =0, AFTER_PREPROCESSING, AFTER_FEATURE_EXTRACTION, AFTER_CLASSIFIER, END_OF_PIPELINE, NUM_CONTEXT_LEVELS } |
Public Member Functions | |
GestureRecognitionPipeline (void) | |
GestureRecognitionPipeline (const GestureRecognitionPipeline &rhs) | |
virtual | ~GestureRecognitionPipeline (void) |
GestureRecognitionPipeline & | operator= (const GestureRecognitionPipeline &rhs) |
bool | train (const ClassificationData &trainingData) |
bool | train (const ClassificationData &trainingData, const UINT kFoldValue, const bool useStratifiedSampling=false) |
bool | train (const TimeSeriesClassificationData &trainingData) |
bool | train (const TimeSeriesClassificationData &trainingData, const UINT kFoldValue, const bool useStratifiedSampling=false) |
bool | train (const RegressionData &trainingData) |
bool | train (const RegressionData &trainingData, const UINT kFoldValue) |
bool | train (const UnlabelledData &trainingData) |
bool | test (const ClassificationData &testData) |
bool | test (const TimeSeriesClassificationData &testData) |
bool | test (const TimeSeriesClassificationDataStream &testData) |
bool | test (const RegressionData &testData) |
bool | predict (const VectorDouble &inputVector) |
bool | predict (const MatrixDouble &inputMatrix) |
bool | map (const VectorDouble &inputVector) |
bool | reset () |
bool | save (const string &filename) const |
bool | savePipelineToFile (const string &filename) const |
bool | load (const string &filename) |
bool | loadPipelineFromFile (const string &filename) |
bool | preProcessData (VectorDouble inputVector, bool computeFeatures=true) |
bool | getIsInitialized () const |
bool | getTrained () const |
bool | getIsPreProcessingSet () const |
bool | getIsFeatureExtractionSet () const |
bool | getIsClassifierSet () const |
bool | getIsRegressifierSet () const |
bool | getIsClustererSet () const |
bool | getIsPostProcessingSet () const |
bool | getIsContextSet () const |
bool | getIsPipelineModeSet () const |
bool | getIsPipelineInClassificationMode () const |
bool | getIsPipelineInRegressionMode () const |
UINT | getInputVectorDimensionsSize () const |
UINT | getOutputVectorDimensionsSize () const |
UINT | getNumClassesInModel () const |
UINT | getNumClasses () const |
UINT | getNumPreProcessingModules () const |
UINT | getNumFeatureExtractionModules () const |
UINT | getNumPostProcessingModules () const |
UINT | getPredictionModuleIndexPosition () const |
UINT | getPredictedClassLabel () const |
UINT | getUnProcessedPredictedClassLabel () const |
UINT | getNumTrainingSamples () const |
UINT | getNumTestSamples () const |
double | getMaximumLikelihood () const |
double | getPhase () const |
double | getCrossValidationAccuracy () const |
double | getTestAccuracy () const |
double | getTestRMSError () const |
double | getTestSSError () const |
double | getTestFMeasure (const UINT classLabel) const |
double | getTestPrecision (const UINT classLabel) const |
double | getTestRecall (const UINT classLabel) const |
double | getTestRejectionPrecision () const |
double | getTestRejectionRecall () const |
double | getTestTime () const |
double | getTrainingTime () const |
double | getTrainingRMSError () const |
double | getTrainingSSError () const |
MatrixDouble | getTestConfusionMatrix () const |
TestResult | getTestResults () const |
VectorDouble | getTestPrecision () const |
VectorDouble | getTestRecall () const |
VectorDouble | getTestFMeasure () const |
VectorDouble | getClassLikelihoods () const |
VectorDouble | getClassDistances () const |
VectorDouble | getNullRejectionThresholds () const |
VectorDouble | getRegressionData () const |
VectorDouble | getUnProcessedRegressionData () const |
VectorDouble | getPreProcessedData () const |
VectorDouble | getPreProcessedData (UINT moduleIndex) const |
VectorDouble | getFeatureExtractionData () const |
VectorDouble | getFeatureExtractionData (const UINT moduleIndex) const |
vector< UINT > | getClassLabels () const |
vector< TestInstanceResult > | getTestInstanceResults () const |
vector< TestResult > | getCrossValidationResults () const |
PreProcessing * | getPreProcessingModule (const UINT moduleIndex) const |
FeatureExtraction * | getFeatureExtractionModule (const UINT moduleIndex) const |
Classifier * | getClassifier () const |
Regressifier * | getRegressifier () const |
Clusterer * | getClusterer () const |
PostProcessing * | getPostProcessingModule (UINT moduleIndex) const |
Context * | getContextModule (const UINT contextLevel, const UINT moduleIndex) const |
template<class T > | |
T * | getPreProcessingModule (const UINT moduleIndex) const |
template<class T > | |
T * | getFeatureExtractionModule (const UINT moduleIndex) const |
template<class T > | |
T * | getClassifier () const |
template<class T > | |
T * | getRegressifier () const |
template<class T > | |
T * | getCluster () const |
template<class T > | |
T * | getPostProcessingModule (const UINT moduleIndex) const |
template<class T > | |
T * | getContextModule (const UINT contextLevel, const UINT moduleIndex) const |
string | getModelAsString () const |
string | getPipelineModeAsString () const |
string | getInfo () const |
UINT | getPipelineModeFromString (string pipelineMode) const |
bool | addPreProcessingModule (const PreProcessing &preProcessingModule, UINT insertIndex=INSERT_AT_END_INDEX) |
bool | setPreProcessingModule (const PreProcessing &preProcessingModule) |
bool | addFeatureExtractionModule (const FeatureExtraction &featureExtractionModule, UINT insertIndex=INSERT_AT_END_INDEX) |
bool | setFeatureExtractionModule (const FeatureExtraction &featureExtractionModule) |
bool | setClassifier (const Classifier &classifier) |
bool | setRegressifier (const Regressifier ®ressifier) |
bool | setClusterer (const Clusterer &clusterer) |
bool | addPostProcessingModule (const PostProcessing &postProcessingModule, UINT insertIndex=INSERT_AT_END_INDEX) |
bool | setPostProcessingModule (const PostProcessing &postProcessingModule) |
bool | addContextModule (const Context &contextModule, UINT contextLevel, UINT insertIndex=INSERT_AT_END_INDEX) |
bool | updateContextModule (bool value, UINT contextLevel=0, UINT moduleIndex=0) |
bool | removeAllPreProcessingModules () |
bool | removePreProcessingModule (UINT moduleIndex) |
bool | removeAllFeatureExtractionModules () |
bool | removeFeatureExtractionModule (UINT moduleIndex) |
bool | removeClassifier () |
bool | removeRegressifier () |
bool | removeClusterer () |
bool | removeAllPostProcessingModules () |
bool | removePostProcessingModule (const UINT moduleIndex) |
bool | removeAllContextModules () |
bool | removeContextModule (const UINT contextLevel, const UINT moduleIndex) |
bool | clearAll () |
bool | clearTestResults () |
bool | setInfo (const string info) |
![]() | |
GRTBase (void) | |
virtual | ~GRTBase (void) |
bool | copyGRTBaseVariables (const GRTBase *GRTBase) |
string | getClassType () const |
string | getLastWarningMessage () const |
string | getLastErrorMessage () const |
string | getLastInfoMessage () const |
GRTBase * | getGRTBasePointer () |
const GRTBase * | getGRTBasePointer () const |
Protected Types | |
enum | PipelineModes { PIPELINE_MODE_NOT_SET =0, CLASSIFICATION_MODE, REGRESSION_MODE, CLUSTER_MODE } |
Protected Member Functions | |
bool | predict_classifier (const VectorDouble &inputVector) |
bool | predict_regressifier (const VectorDouble &inputVector) |
bool | predict_clusterer (const VectorDouble &inputVector) |
void | deleteAllPreProcessingModules () |
void | deleteAllFeatureExtractionModules () |
void | deleteClassifier () |
void | deleteRegressifier () |
void | deleteClusterer () |
void | deleteAllPostProcessingModules () |
void | deleteAllContextModules () |
bool | updateTestMetrics (const UINT classLabel, const UINT predictedClassLabel, VectorDouble &precisionCounter, VectorDouble &recallCounter, double &rejectionPrecisionCounter, double &rejectionRecallCounter, VectorDouble &confusionMatrixCounter) |
bool | computeTestMetrics (VectorDouble &precisionCounter, VectorDouble &recallCounter, double &rejectionPrecisionCounter, double &rejectionRecallCounter, VectorDouble &confusionMatrixCounter, const UINT numTestSamples) |
![]() | |
double | SQR (const double &x) const |
Protected Attributes | |
bool | initialized |
bool | trained |
string | info |
UINT | inputVectorDimensions |
UINT | outputVectorDimensions |
UINT | predictedClassLabel |
UINT | predictedClusterLabel |
UINT | pipelineMode |
UINT | predictionModuleIndex |
UINT | numTrainingSamples |
UINT | numTestSamples |
double | testAccuracy |
double | testRMSError |
double | testSquaredError |
double | testTime |
double | trainingTime |
VectorDouble | testFMeasure |
VectorDouble | testPrecision |
VectorDouble | testRecall |
VectorDouble | regressionData |
double | testRejectionPrecision |
double | testRejectionRecall |
MatrixDouble | testConfusionMatrix |
vector< TestResult > | crossValidationResults |
vector< TestInstanceResult > | testResults |
vector< PreProcessing * > | preProcessingModules |
vector< FeatureExtraction * > | featureExtractionModules |
Classifier * | classifier |
Regressifier * | regressifier |
Clusterer * | clusterer |
vector< PostProcessing * > | postProcessingModules |
vector< vector< Context * > > | contextModules |
![]() | |
string | classType |
DebugLog | debugLog |
ErrorLog | errorLog |
InfoLog | infoLog |
TrainingLog | trainingLog |
TestingLog | testingLog |
WarningLog | warningLog |
Additional Inherited Members | |
![]() | |
static string | getGRTVersion (bool returnRevision=true) |
static string | getGRTRevison () |
Definition at line 53 of file GestureRecognitionPipeline.h.
GRT::GestureRecognitionPipeline::GestureRecognitionPipeline | ( | void | ) |
Default Constructor
Definition at line 25 of file GestureRecognitionPipeline.cpp.
GRT::GestureRecognitionPipeline::GestureRecognitionPipeline | ( | const GestureRecognitionPipeline & | rhs | ) |
Copy Constructor. Performs a depp copy of the data from the rhs pipeline into this pipeline.
Definition at line 56 of file GestureRecognitionPipeline.cpp.
|
virtual |
Default Destructor
Definition at line 167 of file GestureRecognitionPipeline.cpp.
bool GRT::GestureRecognitionPipeline::addContextModule | ( | const Context & | contextModule, |
UINT | contextLevel, | ||
UINT | insertIndex = INSERT_AT_END_INDEX |
||
) |
Adds a new context module to the pipeline. The user can specify the position at which the new module should be inserted into the list of context modules. The default position is to insert the new module at the end of the list.
const | Context &contextModule: a reference to the context module that you want to add |
UINT | contextLevel: the context level where you want to add the new context module |
UINT | insertIndex: the index of where you want to insert the new context module. Default is to insert the new module at the end of the list |
Definition at line 3049 of file GestureRecognitionPipeline.cpp.
bool GRT::GestureRecognitionPipeline::addFeatureExtractionModule | ( | const FeatureExtraction & | featureExtractionModule, |
UINT | insertIndex = INSERT_AT_END_INDEX |
||
) |
Adds a new feature extraction module to the pipeline. The user can specify the position at which the new module should be inserted into the list of feature extraction modules. The default position is to insert the new module at the end of the list.
const | FeatureExtraction &featureExtractionModule: a reference to the feature extraction module you want to add |
UINT | insertIndex: the index of where you want to insert the new feature extraction module. Default is to insert the new module at the end of the list |
Definition at line 2868 of file GestureRecognitionPipeline.cpp.
bool GRT::GestureRecognitionPipeline::addPostProcessingModule | ( | const PostProcessing & | postProcessingModule, |
UINT | insertIndex = INSERT_AT_END_INDEX |
||
) |
Adds a new post processing module to the pipeline. The user can specify the position at which the new module should be inserted into the list of post processing modules. The default position is to insert the new module at the end of the list.
const | PostProcessing &postProcessingModule: a reference to the post processing module you want to add |
UINT | insertIndex: the index of where you want to insert the new post processing module. Default is to insert the new module at the end of the list |
Definition at line 3011 of file GestureRecognitionPipeline.cpp.
bool GRT::GestureRecognitionPipeline::addPreProcessingModule | ( | const PreProcessing & | preProcessingModule, |
UINT | insertIndex = INSERT_AT_END_INDEX |
||
) |
Adds a new pre processing module to the pipeline. The user can specify the position at which the new module should be inserted into the list of preprocessing modules. The default position is to insert the new module at the end of the list.
const | PreProcessing &preProcessingModule: a reference to the pre processing module you want to add |
UINT | insertIndex: the index of where you want to insert the new pre processing module. Default is to insert the new module at the end of the list |
Definition at line 2830 of file GestureRecognitionPipeline.cpp.
bool GRT::GestureRecognitionPipeline::clearAll | ( | ) |
Removes everything from the pipeline.
Definition at line 3191 of file GestureRecognitionPipeline.cpp.
bool GRT::GestureRecognitionPipeline::clearTestResults | ( | ) |
Resets all the test results to zero.
Definition at line 3204 of file GestureRecognitionPipeline.cpp.
VectorDouble GRT::GestureRecognitionPipeline::getClassDistances | ( | ) | const |
Gets a vector of the class distances from the last prediction, this will be an N-dimensional vector, where N is the number of classes in the model. The exact form of these distances depends on the classification algorithm.
Definition at line 2706 of file GestureRecognitionPipeline.cpp.
Classifier * GRT::GestureRecognitionPipeline::getClassifier | ( | ) | const |
Gets a pointer to the classifier module.
Definition at line 2796 of file GestureRecognitionPipeline.cpp.
|
inline |
Gets a pointer to the classifier module. If the classifier has not been set, or the template type T does not match the current classifier type then the function will return NULL.
Definition at line 793 of file GestureRecognitionPipeline.h.
vector< UINT > GRT::GestureRecognitionPipeline::getClassLabels | ( | ) | const |
Gets a vector containing the label each class represents, this will be an N-dimensional vector, where N is the number of classes in the model. This is useful if the model was trained with non-monotonically class labels (i.e. class labels such as [1, 3, 6, 9, 12] instead of [1, 2, 3, 4, 5]).
Definition at line 2761 of file GestureRecognitionPipeline.cpp.
VectorDouble GRT::GestureRecognitionPipeline::getClassLikelihoods | ( | ) | const |
Gets a vector of the class likelihoods from the last prediction, this will be an N-dimensional vector, where N is the number of classes in the model. The exact form of these likelihoods depends on the classification algorithm.
Definition at line 2700 of file GestureRecognitionPipeline.cpp.
|
inline |
Gets a pointer to the cluster module. If the cluster has not been set, or the template type T does not match the current cluster type then the function will return NULL.
Definition at line 831 of file GestureRecognitionPipeline.h.
Clusterer * GRT::GestureRecognitionPipeline::getClusterer | ( | ) | const |
Gets a pointer to the clusterer module.
Definition at line 2804 of file GestureRecognitionPipeline.cpp.
Context * GRT::GestureRecognitionPipeline::getContextModule | ( | const UINT | contextLevel, |
const UINT | moduleIndex | ||
) | const |
Gets a pointer to the context module at the specific contextLevel and moduleIndex.
const | UINT contextLevel: the context level that contains the context module you want |
const | UINT moduleIndex: the index of the context module you want |
Definition at line 2816 of file GestureRecognitionPipeline.cpp.
|
inline |
Gets a pointer to the context module at the specific contextLevel and moduleIndex. You should make sure that the type of the context module matches the template type.
const | UINT contextLevel: the context level that contains the context module you want |
const | UINT moduleIndex: the index of the context module you want |
Definition at line 864 of file GestureRecognitionPipeline.h.
double GRT::GestureRecognitionPipeline::getCrossValidationAccuracy | ( | ) | const |
This function returns the cross validation value from the most recent cross validation test. If the pipeline is in prediction mode, then the cross validation accuracy will be the average accuracy across each fold of testing. If the pipeline is in regression mode, then the cross validation accuracy will be the average RMS error across each fold of testing.
Definition at line 2587 of file GestureRecognitionPipeline.cpp.
vector< TestResult > GRT::GestureRecognitionPipeline::getCrossValidationResults | ( | ) | const |
Gets a vector containing the results from the most recent cross validation test. Each element in the vector represents one fold of cross validation training.
Definition at line 2776 of file GestureRecognitionPipeline.cpp.
VectorDouble GRT::GestureRecognitionPipeline::getFeatureExtractionData | ( | ) | const |
Gets a vector containing the output of the last feature extraction module, this will be an M-dimensional vector, where M is the output size of the last feature extraction module.
Definition at line 2744 of file GestureRecognitionPipeline.cpp.
VectorDouble GRT::GestureRecognitionPipeline::getFeatureExtractionData | ( | const UINT | moduleIndex | ) | const |
Gets a vector containing the output of the feature extraction module at index X, this will be an M-dimensional vector, where M is the output size of the feature extraction module.
const | UINT moduleIndex: the index of the feature extraction module you want |
Definition at line 2751 of file GestureRecognitionPipeline.cpp.
FeatureExtraction * GRT::GestureRecognitionPipeline::getFeatureExtractionModule | ( | const UINT | moduleIndex | ) | const |
Gets a pointer to the feature extraction module at the specific moduleIndex.
UINT | moduleIndex: the index of the feature extraction module you want |
Definition at line 2788 of file GestureRecognitionPipeline.cpp.
|
inline |
Gets a pointer to the feature extraction module at the specific moduleIndex. You should make sure that the type of the feature extraction module matches the template type.
const | UINT moduleIndex: the index of the feature extraction module you want |
Definition at line 780 of file GestureRecognitionPipeline.h.
UINT GRT::GestureRecognitionPipeline::getInputVectorDimensionsSize | ( | ) | const |
This function returns the size of the expected input vector to the pipeline. This size comes from the size of the training data used to train the pipeline.
Definition at line 2483 of file GestureRecognitionPipeline.cpp.
bool GRT::GestureRecognitionPipeline::getIsClassifierSet | ( | ) | const |
This function returns true if a classifier has been added to the pipeline.
Definition at line 2448 of file GestureRecognitionPipeline.cpp.
bool GRT::GestureRecognitionPipeline::getIsClustererSet | ( | ) | const |
This function returns true if a clusterer has been added to the pipeline.
Definition at line 2456 of file GestureRecognitionPipeline.cpp.
bool GRT::GestureRecognitionPipeline::getIsContextSet | ( | ) | const |
This function returns true if any context modules have been added to the pipeline.
Definition at line 2464 of file GestureRecognitionPipeline.cpp.
bool GRT::GestureRecognitionPipeline::getIsFeatureExtractionSet | ( | ) | const |
This function returns true if any feature extraction modules have been added to the pipeline.
Definition at line 2444 of file GestureRecognitionPipeline.cpp.
bool GRT::GestureRecognitionPipeline::getIsInitialized | ( | ) | const |
This function returns true if the pipeline has been initialized. The pipeline is initialized if either a classifier or regressifier module has been set at the core of the pipeline.
Definition at line 2432 of file GestureRecognitionPipeline.cpp.
bool GRT::GestureRecognitionPipeline::getIsPipelineInClassificationMode | ( | ) | const |
This function returns true if a classifier has been added to the pipeline (and the pipeline is therefore in classification mode).
Definition at line 2475 of file GestureRecognitionPipeline.cpp.
bool GRT::GestureRecognitionPipeline::getIsPipelineInRegressionMode | ( | ) | const |
This function returns true if a regressifier has been added to the pipeline (and the pipeline is therefore in regression mode).
Definition at line 2479 of file GestureRecognitionPipeline.cpp.
bool GRT::GestureRecognitionPipeline::getIsPipelineModeSet | ( | ) | const |
This function returns true if either a classifier or regressifier has been added to the pipeline.
Definition at line 2471 of file GestureRecognitionPipeline.cpp.
bool GRT::GestureRecognitionPipeline::getIsPostProcessingSet | ( | ) | const |
This function returns true if any post processing modules have been added to the pipeline.
Definition at line 2460 of file GestureRecognitionPipeline.cpp.
bool GRT::GestureRecognitionPipeline::getIsPreProcessingSet | ( | ) | const |
This function returns true if any preprocessing modules have been added to the pipeline.
Definition at line 2440 of file GestureRecognitionPipeline.cpp.
bool GRT::GestureRecognitionPipeline::getIsRegressifierSet | ( | ) | const |
This function returns true if a regressifier has been added to the pipeline.
Definition at line 2452 of file GestureRecognitionPipeline.cpp.
double GRT::GestureRecognitionPipeline::getMaximumLikelihood | ( | ) | const |
This function returns the maximum likelihood value from the most likely class from the most recent prediction. This value is only relevant when the pipeline is in prediction mode.
Definition at line 2570 of file GestureRecognitionPipeline.cpp.
string GRT::GestureRecognitionPipeline::getModelAsString | ( | ) | const |
Gets the pipeline model as a string. This includes any classification or regression model, but also any preprocessing, feature extraction or post processing settings.
Definition at line 3413 of file GestureRecognitionPipeline.cpp.
VectorDouble GRT::GestureRecognitionPipeline::getNullRejectionThresholds | ( | ) | const |
Gets a vector containing the null rejection thresholds for each class, this will be an N-dimensional vector, where N is the number of classes in the model.
Definition at line 2712 of file GestureRecognitionPipeline.cpp.
UINT GRT::GestureRecognitionPipeline::getNumClasses | ( | ) | const |
This function returns the number of classes in the model. If the model has not been trained then the number of classes will be zero. This is only relevant when the pipeline is in classification mode.
Definition at line 2514 of file GestureRecognitionPipeline.cpp.
UINT GRT::GestureRecognitionPipeline::getNumClassesInModel | ( | ) | const |
This function is now depreciated. You should use getNumClasses() instead.
Definition at line 2510 of file GestureRecognitionPipeline.cpp.
UINT GRT::GestureRecognitionPipeline::getNumFeatureExtractionModules | ( | ) | const |
This function returns the number of feature extraction modules that have been added to the pipeline.
Definition at line 2529 of file GestureRecognitionPipeline.cpp.
UINT GRT::GestureRecognitionPipeline::getNumPostProcessingModules | ( | ) | const |
This function returns the number of post processing modules that have been added to the pipeline.
Definition at line 2533 of file GestureRecognitionPipeline.cpp.
UINT GRT::GestureRecognitionPipeline::getNumPreProcessingModules | ( | ) | const |
This function returns the number of preprocessing modules that have been added to the pipeline.
Definition at line 2525 of file GestureRecognitionPipeline.cpp.
UINT GRT::GestureRecognitionPipeline::getNumTestSamples | ( | ) | const |
This function returns the number of test samples used to train the pipeline model.
Definition at line 2566 of file GestureRecognitionPipeline.cpp.
UINT GRT::GestureRecognitionPipeline::getNumTrainingSamples | ( | ) | const |
This function returns the number of training samples used to train the pipeline model.
Definition at line 2562 of file GestureRecognitionPipeline.cpp.
UINT GRT::GestureRecognitionPipeline::getOutputVectorDimensionsSize | ( | ) | const |
This function returns the size of the expected output vector from the pipeline. This size comes from the size of the training data used to train the pipeline. This is only relevant when the pipeline is in regression mode.
Definition at line 2502 of file GestureRecognitionPipeline.cpp.
double GRT::GestureRecognitionPipeline::getPhase | ( | ) | const |
This function returns the estimated gesture phase from the most recent prediction. This value is only relevant when the pipeline is in timeseries classification mode.
Definition at line 2580 of file GestureRecognitionPipeline.cpp.
string GRT::GestureRecognitionPipeline::getPipelineModeAsString | ( | ) | const |
Gets the pipeline mode as a string, this will be either "PIPELINE_MODE_NOT_SET","CLASSIFICATION_MODE", or "REGRESSION_MODE".
Definition at line 3438 of file GestureRecognitionPipeline.cpp.
UINT GRT::GestureRecognitionPipeline::getPipelineModeFromString | ( | string | pipelineMode | ) | const |
Converts a string to the pipeline mode.
string | pipelineMode: the pipeline mode as a string, i.e. "CLASSIFICATION_MODE" |
Definition at line 3461 of file GestureRecognitionPipeline.cpp.
PostProcessing * GRT::GestureRecognitionPipeline::getPostProcessingModule | ( | UINT | moduleIndex | ) | const |
Gets a pointer to the post processing module at the specific moduleIndex.
UINT | moduleIndex: the index of the post processing module you want |
Definition at line 2808 of file GestureRecognitionPipeline.cpp.
|
inline |
Gets a pointer to the post processing module at the specific moduleIndex. You should make sure that the type of the post processing module matches the template type.
const | UINT moduleIndex: the index of the post processing module you want |
Definition at line 850 of file GestureRecognitionPipeline.h.
UINT GRT::GestureRecognitionPipeline::getPredictedClassLabel | ( | ) | const |
This function returns the predicted class label from the most recent predict(...) function call. This value is only relevant when the pipeline is in prediction mode.
Definition at line 2541 of file GestureRecognitionPipeline.cpp.
UINT GRT::GestureRecognitionPipeline::getPredictionModuleIndexPosition | ( | ) | const |
This function returns the current position of the prediction module index. The prediction module index indicates how far along the pipeline a data sample gets before the pipeline exits during a prediction. For example, if you have two preprocessing modules, one feature extraction module, a classifier, and one post processing module in your pipeline and the prediction module index is 3 after you call the predict(...) function, then the data only got as far as the feature extraction module but did not get passed through the classifier or post processing modules.
Definition at line 2537 of file GestureRecognitionPipeline.cpp.
VectorDouble GRT::GestureRecognitionPipeline::getPreProcessedData | ( | ) | const |
Gets a vector containing the output of the last preprocessing module, this will be an M-dimensional vector, where M is the output size of the last preprocessing module.
Definition at line 2728 of file GestureRecognitionPipeline.cpp.
VectorDouble GRT::GestureRecognitionPipeline::getPreProcessedData | ( | UINT | moduleIndex | ) | const |
Gets a vector containing the output of the preprocessing module at index X, this will be an M-dimensional vector, where M is the output size of the preprocessing module.
UINT | moduleIndex: the index of the pre processing module you want |
Definition at line 2735 of file GestureRecognitionPipeline.cpp.
PreProcessing * GRT::GestureRecognitionPipeline::getPreProcessingModule | ( | const UINT | moduleIndex | ) | const |
Gets a pointer to the preprocessing module at the specific moduleIndex.
const | UINT moduleIndex: the index of the pre processing module you want |
Definition at line 2780 of file GestureRecognitionPipeline.cpp.
|
inline |
Gets a pointer to the preprocessing module at the specific moduleIndex. You should make sure that the type of the preprocessing module matches the template type.
const | UINT moduleIndex: the index of the pre processing module you want |
Definition at line 767 of file GestureRecognitionPipeline.h.
Regressifier * GRT::GestureRecognitionPipeline::getRegressifier | ( | ) | const |
Gets a pointer to the regressifier module.
Definition at line 2800 of file GestureRecognitionPipeline.cpp.
|
inline |
Gets a pointer to the regressifier module. If the regressifier has not been set, or the template type T does not match the current regressifier type then the function will return NULL.
Definition at line 812 of file GestureRecognitionPipeline.h.
VectorDouble GRT::GestureRecognitionPipeline::getRegressionData | ( | ) | const |
Gets a vector containing the regression data output by the pipeline, this will be an M-dimensional vector, where M is the number of output dimensions in the model.
Definition at line 2717 of file GestureRecognitionPipeline.cpp.
double GRT::GestureRecognitionPipeline::getTestAccuracy | ( | ) | const |
This function returns the accuracy value from the most recent test. This will be a value between [0 100]. This value is only relevant when the pipeline is in prediction mode.
Definition at line 2591 of file GestureRecognitionPipeline.cpp.
MatrixDouble GRT::GestureRecognitionPipeline::getTestConfusionMatrix | ( | ) | const |
This function returns the confusion matrix for the most recent round of testing. If null rejection is enabled then the first row and column of the confusion matrix will represent the null class (class label 0).
Definition at line 2666 of file GestureRecognitionPipeline.cpp.
double GRT::GestureRecognitionPipeline::getTestFMeasure | ( | const UINT | classLabel | ) | const |
This function returns the f-measure from the most recent test for the class with the matching classLabel. This value is only relevant when the pipeline is in classification mode. If the classLabel is not valid then the function will return -1.
const | UINT classLabel: the label of the class you want to get the test fMeasure value for |
Definition at line 2603 of file GestureRecognitionPipeline.cpp.
VectorDouble GRT::GestureRecognitionPipeline::getTestFMeasure | ( | ) | const |
Gets a vector of the fMeasure results for each class from the most recent round of testing. This will be a K-dimensional vector, where K is the number of classes in the model.
Definition at line 2696 of file GestureRecognitionPipeline.cpp.
vector< TestInstanceResult > GRT::GestureRecognitionPipeline::getTestInstanceResults | ( | ) | const |
Gets a vector containing the results from the most recent test. Each element in the vector represents the results for the corresponding test sample.
Definition at line 2772 of file GestureRecognitionPipeline.cpp.
double GRT::GestureRecognitionPipeline::getTestPrecision | ( | const UINT | classLabel | ) | const |
This function returns the precision from the most recent test for the class with the matching classLabel. This value is only relevant when the pipeline is in classification mode. If the classLabel is not valid then the function will return -1.
const | UINT classLabel: the label of the class you want to get the test precision value for |
Definition at line 2616 of file GestureRecognitionPipeline.cpp.
VectorDouble GRT::GestureRecognitionPipeline::getTestPrecision | ( | ) | const |
Gets a vector of the precision results for each class from the most recent round of testing. This will be a K-dimensional vector, where K is the number of classes in the model.
Definition at line 2688 of file GestureRecognitionPipeline.cpp.
double GRT::GestureRecognitionPipeline::getTestRecall | ( | const UINT | classLabel | ) | const |
This function returns the recall from the most recent test for the class with the matching classLabel. This value is only relevant when the pipeline is in classification mode. If the classLabel is not valid then the function will return -1.
const | UINT classLabel: the label of the class you want to get the test recall value for |
Definition at line 2629 of file GestureRecognitionPipeline.cpp.
VectorDouble GRT::GestureRecognitionPipeline::getTestRecall | ( | ) | const |
Gets a vector of the recall results for each class from the most recent round of testing. This will be a K-dimensional vector, where K is the number of classes in the model.
Definition at line 2692 of file GestureRecognitionPipeline.cpp.
double GRT::GestureRecognitionPipeline::getTestRejectionPrecision | ( | ) | const |
This function returns the precision for any null examples in your dataset (examples with the class label of 0) from the most recent test. This value is only relevant when the pipeline is in classification mode.
Definition at line 2642 of file GestureRecognitionPipeline.cpp.
double GRT::GestureRecognitionPipeline::getTestRejectionRecall | ( | ) | const |
This function returns the recall for any null examples in your dataset (examples with the class label of 0) from the most recent test. This value is only relevant when the pipeline is in classification mode.
Definition at line 2646 of file GestureRecognitionPipeline.cpp.
TestResult GRT::GestureRecognitionPipeline::getTestResults | ( | ) | const |
This function returns all the results from the most recent round of testing. The TestResult contains all of the test metrics, such as the accuracy, precision, recall, training and test times, etc. These are the same results that you would get if you called the individaul functions (such as getTestAccuracy()).
Definition at line 2670 of file GestureRecognitionPipeline.cpp.
double GRT::GestureRecognitionPipeline::getTestRMSError | ( | ) | const |
This function returns the root mean squared error value from the most recent test. This value is only relevant when the pipeline is in regression mode.
Definition at line 2595 of file GestureRecognitionPipeline.cpp.
double GRT::GestureRecognitionPipeline::getTestSSError | ( | ) | const |
This function returns the total squared error value from the most recent test. This value is only relevant when the pipeline is in regression mode.
Definition at line 2599 of file GestureRecognitionPipeline.cpp.
double GRT::GestureRecognitionPipeline::getTestTime | ( | ) | const |
This function returns the total test time (in milliseconds) for the most recent test.
Definition at line 2650 of file GestureRecognitionPipeline.cpp.
bool GRT::GestureRecognitionPipeline::getTrained | ( | ) | const |
This function returns true if the classifier or regressifier at the core of the pipeline has been trained.
Definition at line 2436 of file GestureRecognitionPipeline.cpp.
double GRT::GestureRecognitionPipeline::getTrainingRMSError | ( | ) | const |
This function returns the root mean squared error value from the most recent training. This value is only relevant when the pipeline is in regression mode.
Definition at line 2658 of file GestureRecognitionPipeline.cpp.
double GRT::GestureRecognitionPipeline::getTrainingSSError | ( | ) | const |
This function returns the total squared error value from the most recent training. This value is only relevant when the pipeline is in regression mode.
Definition at line 2662 of file GestureRecognitionPipeline.cpp.
double GRT::GestureRecognitionPipeline::getTrainingTime | ( | ) | const |
This function returns the total training time (in milliseconds) for the most recent training.
Definition at line 2654 of file GestureRecognitionPipeline.cpp.
UINT GRT::GestureRecognitionPipeline::getUnProcessedPredictedClassLabel | ( | ) | const |
This function returns the unprocessed predicted class label from the most recent predict(...) function call. The unprocessed predicted class label is the class label output by the classifier before any post processing modules filter the value. This value is only relevant when the pipeline is in prediction mode.
Definition at line 2552 of file GestureRecognitionPipeline.cpp.
VectorDouble GRT::GestureRecognitionPipeline::getUnProcessedRegressionData | ( | ) | const |
Gets a vector containing the regression data output by the regression algorithm, this will be an M-dimensional vector, where M is the number of output dimensions in the model.
Definition at line 2721 of file GestureRecognitionPipeline.cpp.
bool GRT::GestureRecognitionPipeline::load | ( | const string & | filename | ) |
This function will load an entire pipeline from a file. This includes all the modules types, settings, and models. This calls the older loadPipelineFromFile function
const | string &filename: the name of the file you want to load the pipeline from |
Definition at line 2096 of file GestureRecognitionPipeline.cpp.
bool GRT::GestureRecognitionPipeline::loadPipelineFromFile | ( | const string & | filename | ) |
This function will load an entire pipeline from a file. This includes all the modules types, settings, and models.
const | string &filename: the name of the file you want to load the pipeline from |
Definition at line 2100 of file GestureRecognitionPipeline.cpp.
bool GRT::GestureRecognitionPipeline::map | ( | const VectorDouble & | inputVector | ) |
This function is now depreciated, you should use the predict function instead.
This function used to be the main interface for all regression using the gesture recognition pipeline. You should only call this function if you have trained the pipeline. The input vector should be the same size as your training data.
const | VectorDouble &inputVector: the input data that will be passed through the pipeline for regression |
Definition at line 1424 of file GestureRecognitionPipeline.cpp.
GestureRecognitionPipeline & GRT::GestureRecognitionPipeline::operator= | ( | const GestureRecognitionPipeline & | rhs | ) |
Equals Constructor. Performs a depp copy of the data from the rhs pipeline into this pipeline.
Definition at line 91 of file GestureRecognitionPipeline.cpp.
bool GRT::GestureRecognitionPipeline::predict | ( | const VectorDouble & | inputVector | ) |
This function is the main interface for all predictions using the gesture recognition pipeline. You can use this function for both classification and regression. You should only call this function if you have trained the pipeline. The input vector should be the same size as your training data.
const | VectorDouble &inputVector: the input data that will be passed through the pipeline for classification or regression |
Definition at line 1253 of file GestureRecognitionPipeline.cpp.
bool GRT::GestureRecognitionPipeline::predict | ( | const MatrixDouble & | inputMatrix | ) |
This function is an interface for predictions using timeseries or Matrix data. You should only call this function if you have trained the pipeline. The input matrix should have the same number of columns as your training data.
const | MatrixDouble &inputMatrix: the input atrix that will be passed through the pipeline for classification |
Definition at line 1283 of file GestureRecognitionPipeline.cpp.
bool GRT::GestureRecognitionPipeline::preProcessData | ( | VectorDouble | inputVector, |
bool | computeFeatures = true |
||
) |
This function will pass the input vector through any preprocessing or feature extraction modules added to the pipeline. This function can be useful for testing and validating a preprocessing or feature extraction module, without having to acutally train a classification or regression module. The second parameter controls if any feature extraction module should be used. If set to true then both preprocessing and feature extraction modules will be used, if false then just preprocessing modules will be used.
The function will not pass the preprocessed data through the classification or regression module.
After calling this function, you can access the preprocessed results via the getPreProcessedData() or getFeatureExtractionData() functions.
Definition at line 2394 of file GestureRecognitionPipeline.cpp.
bool GRT::GestureRecognitionPipeline::removeAllContextModules | ( | ) |
Removes all the context modules from the current pipeline. If the pipeline has been trained it will need to be retrained before it can be used.
Definition at line 3186 of file GestureRecognitionPipeline.cpp.
bool GRT::GestureRecognitionPipeline::removeAllFeatureExtractionModules | ( | ) |
Removes all the feature extraction modules from the current pipeline. If the pipeline has been trained it will need to be retrained before it can be used.
Definition at line 3124 of file GestureRecognitionPipeline.cpp.
bool GRT::GestureRecognitionPipeline::removeAllPostProcessingModules | ( | ) |
Removes all the post processing extraction modules from the current pipeline. If the pipeline has been trained it will need to be retrained before it can be used.
Definition at line 3146 of file GestureRecognitionPipeline.cpp.
bool GRT::GestureRecognitionPipeline::removeAllPreProcessingModules | ( | ) |
Removes all the preprocessing modules from the current pipeline. If the pipeline has been trained it will need to be retrained before it can be used.
Definition at line 3102 of file GestureRecognitionPipeline.cpp.
|
inline |
Removes the classifier from the current pipeline.
Definition at line 1037 of file GestureRecognitionPipeline.h.
|
inline |
Removes the clusterer from the current pipeline.
Definition at line 1051 of file GestureRecognitionPipeline.h.
bool GRT::GestureRecognitionPipeline::removeContextModule | ( | const UINT | contextLevel, |
const UINT | moduleIndex | ||
) |
Removes the specific context module at the module index from the current pipeline. If the pipeline has been trained it will need to be retrained before it can be used.
const | UINT contextLevel: the context level that contains the specific context module you want to remove |
const | UINT moduleIndex: the index of the context module you want to remove |
Definition at line 3168 of file GestureRecognitionPipeline.cpp.
bool GRT::GestureRecognitionPipeline::removeFeatureExtractionModule | ( | UINT | moduleIndex | ) |
Removes the specific feature extraction module at the module index from the current pipeline. If the pipeline has been trained it will need to be retrained before it can be used.
UINT | moduleIndex: the index of the module you want to remove |
Definition at line 3129 of file GestureRecognitionPipeline.cpp.
bool GRT::GestureRecognitionPipeline::removePostProcessingModule | ( | const UINT | moduleIndex | ) |
Removes the specific post processing module at the module index from the current pipeline. If the pipeline has been trained it will need to be retrained before it can be used.
const | UINT moduleIndex: the index of the module you want to remove |
Definition at line 3151 of file GestureRecognitionPipeline.cpp.
bool GRT::GestureRecognitionPipeline::removePreProcessingModule | ( | UINT | moduleIndex | ) |
Removes the specific preprocessing module at the module index from the current pipeline. If the pipeline has been trained it will need to be retrained before it can be used.
UINT | moduleIndex: the index of the module you want to remove |
Definition at line 3107 of file GestureRecognitionPipeline.cpp.
|
inline |
Removes the regressifier from the current pipeline.
Definition at line 1044 of file GestureRecognitionPipeline.h.
bool GRT::GestureRecognitionPipeline::reset | ( | ) |
This function is the main interface for resetting the entire gesture recognition pipeline. This function will call reset on all the modules in the current pipeline.
Definition at line 1900 of file GestureRecognitionPipeline.cpp.
bool GRT::GestureRecognitionPipeline::save | ( | const string & | filename | ) | const |
This function will save the entire pipeline to a file. This includes all the modules types, settings, and models. This calls the older savePipelineToFile function.
const | string &filename: the name of the file you want to save the pipeline to |
Definition at line 1959 of file GestureRecognitionPipeline.cpp.
bool GRT::GestureRecognitionPipeline::savePipelineToFile | ( | const string & | filename | ) | const |
This function will save the entire pipeline to a file. This includes all the modules types, settings, and models.
const | string &filename: the name of the file you want to save the pipeline to |
Definition at line 1963 of file GestureRecognitionPipeline.cpp.
bool GRT::GestureRecognitionPipeline::setClassifier | ( | const Classifier & | classifier | ) |
Sets the classifier at the core of the pipeline. A pipeline can only have one classifier or regressifier, setting a new classifier will override any previous classifier or regressifier.
const | Classifier &classifier: a reference to the classifier module you want to add to the pipeline |
Definition at line 2906 of file GestureRecognitionPipeline.cpp.
bool GRT::GestureRecognitionPipeline::setClusterer | ( | const Clusterer & | clusterer | ) |
Sets the clusterer at the core of the pipeline. A pipeline can only have one cluster algorithm, setting a new cluster will override any previous classifier or regressifier.
const | Regressifier ®ressifier: a reference to the regression module you want to add to the pipeline |
Definition at line 2978 of file GestureRecognitionPipeline.cpp.
bool GRT::GestureRecognitionPipeline::setFeatureExtractionModule | ( | const FeatureExtraction & | featureExtractionModule | ) |
This function removes any existing feature extraction modules, then it adds the new feature extraction module.
const | FeatureExtraction &featureExtractionModule: a reference to the feature extraction module you want to add |
Definition at line 2901 of file GestureRecognitionPipeline.cpp.
bool GRT::GestureRecognitionPipeline::setInfo | ( | const string | info | ) |
Sets the pipeline's info text.
Definition at line 3223 of file GestureRecognitionPipeline.cpp.
bool GRT::GestureRecognitionPipeline::setPostProcessingModule | ( | const PostProcessing & | postProcessingModule | ) |
This function removes any existing post processing modules, then it adds the new post processing module.
const | PostProcessing &postProcessingModule: a reference to the post processing module you want to add |
Definition at line 3044 of file GestureRecognitionPipeline.cpp.
bool GRT::GestureRecognitionPipeline::setPreProcessingModule | ( | const PreProcessing & | preProcessingModule | ) |
This function removes any existing pre processing modules, then it adds the new pre processing module.
const | PreProcessing &preProcessingModule: a reference to the pre processing module you want to add |
Definition at line 2863 of file GestureRecognitionPipeline.cpp.
bool GRT::GestureRecognitionPipeline::setRegressifier | ( | const Regressifier & | regressifier | ) |
Sets the regressifier at the core of the pipeline. A pipeline can only have one classifier or regressifier, setting a new regressifier will override any previous classifier or regressifier.
const | Regressifier ®ressifier: a reference to the regression module you want to add to the pipeline |
Definition at line 2945 of file GestureRecognitionPipeline.cpp.
bool GRT::GestureRecognitionPipeline::test | ( | const ClassificationData & | testData | ) |
This function is the main interface for testing the accuracy of a pipeline with ClassificationData. This function will pass the testData through any PreProcessing or FeatureExtraction modules that have been added to the GestureRecognitionPipeline, and then calls the predict function of the classification module that has been added to the GestureRecognitionPipeline. The function will return true if the pipeline was tested successfully, false otherwise.
const | ClassificationData &testData: the labelled classification data that will be used to test the accuracy of the pipeline |
Definition at line 884 of file GestureRecognitionPipeline.cpp.
bool GRT::GestureRecognitionPipeline::test | ( | const TimeSeriesClassificationData & | testData | ) |
This function is the main interface for testing the accuracy of a pipeline with TimeSeriesClassificationData. This function will pass the testData through any PreProcessing or FeatureExtraction modules that have been added to the GestureRecognitionPipeline, and then calls the predict function of the classification module that has been added to the GestureRecognitionPipeline. The function will return true if the pipeline was tested successfully, false otherwise.
const | TimeSeriesClassificationData &testData: the labelled timeseries classification data that will be used to test the accuracy of the pipeline |
Definition at line 996 of file GestureRecognitionPipeline.cpp.
bool GRT::GestureRecognitionPipeline::test | ( | const TimeSeriesClassificationDataStream & | testData | ) |
This function is the main interface for testing the accuracy of a pipeline with TimeSeriesClassificationDataStream. This function will pass the testData through any PreProcessing or FeatureExtraction modules that have been added to the GestureRecognitionPipeline, and then calls the predict function of the classification module that has been added to the GestureRecognitionPipeline. The function will return true if the pipeline was tested successfully, false otherwise.
const | TimeSeriesClassificationDataStreamStream &testData: the timeseries classification data stream that will be used to test the accuracy of the pipeline |
Definition at line 1075 of file GestureRecognitionPipeline.cpp.
bool GRT::GestureRecognitionPipeline::test | ( | const RegressionData & | testData | ) |
This function is the main interface for testing the accuracy of a pipeline with RegressionData. This function will pass the testData through any PreProcessing or FeatureExtraction modules that have been added to the GestureRecognitionPipeline, and then calls the predict function of the regression module that has been added to the GestureRecognitionPipeline. The function will return true if the pipeline was tested successfully, false otherwise.
const | RegressionData &testData: the labelled regression data that will be used to test the accuracy of the pipeline |
Definition at line 1179 of file GestureRecognitionPipeline.cpp.
bool GRT::GestureRecognitionPipeline::train | ( | const ClassificationData & | trainingData | ) |
This is the main training interface for training a Classifier with ClassificationData. This function will pass the trainingData through any PreProcessing or FeatureExtraction modules that have been added to the GestureRecognitionPipeline, and then calls the training function of the Classification module that has been added to the GestureRecognitionPipeline. The function will return true if the classifier was trained successfully, false otherwise.
ClassificationData | trainingData: the labelled classification training data that will be used to train the classifier at the core of the pipeline |
Definition at line 179 of file GestureRecognitionPipeline.cpp.
bool GRT::GestureRecognitionPipeline::train | ( | const ClassificationData & | trainingData, |
const UINT | kFoldValue, | ||
const bool | useStratifiedSampling = false |
||
) |
This is the main training interface for training a Classifier with ClassificationData using K-fold cross validation. This function will pass the trainingData through any PreProcessing or FeatureExtraction modules that have been added to the GestureRecognitionPipeline, and then calls the training function of the Classification module that has been added to the GestureRecognitionPipeline. The function will return true if the classifier was trained successfully, false otherwise.
const | ClassificationData &trainingData: the labelled classification training data that will be used to train the classifier at the core of the pipeline |
const | UINT kFoldValue: the number of cross validation folds, this should be a value between in the range of [1 M-1], where M is the number of training samples int the LabelledClassificationData |
const | bool useStratifiedSampling: sets if stratified sampling should be used during the cross validation training |
Train the classification system
Definition at line 283 of file GestureRecognitionPipeline.cpp.
bool GRT::GestureRecognitionPipeline::train | ( | const TimeSeriesClassificationData & | trainingData | ) |
This is the main training interface for training a Classifier with TimeSeriesClassificationData. This function will pass the trainingData through any PreProcessing or FeatureExtraction modules that have been added to the GestureRecognitionPipeline, and then calls the training function of the Classification module that has been added to the GestureRecognitionPipeline. The function will return true if the classifier was trained successfully, false otherwise.
const | TimeSeriesClassificationData &trainingData: the labelled time-series classification training data that will be used to train the classifier at the core of the pipeline |
Definition at line 354 of file GestureRecognitionPipeline.cpp.
bool GRT::GestureRecognitionPipeline::train | ( | const TimeSeriesClassificationData & | trainingData, |
const UINT | kFoldValue, | ||
const bool | useStratifiedSampling = false |
||
) |
This is the main training interface for training a Classifier with TimeSeriesClassificationData using K-fold cross validation. This function will pass the trainingData through any PreProcessing or FeatureExtraction modules that have been added to the GestureRecognitionPipeline, and then calls the training function of the Classification module that has been added to the GestureRecognitionPipeline. The function will return true if the classifier was trained successfully, false otherwise.
const | TimeSeriesClassificationData &trainingData: the labelled time-series classification training data that will be used to train the classifier at the core of the pipeline |
const | UINT kFoldValue: the number of cross validation folds, this should be a value between in the range of [1 M-1], where M is the number of training samples in the LabelledClassificationData |
const | bool useStratifiedSampling: sets if stratified sampling should be used during the cross validation training |
Train the classification system
Definition at line 550 of file GestureRecognitionPipeline.cpp.
bool GRT::GestureRecognitionPipeline::train | ( | const RegressionData & | trainingData | ) |
This is the main training interface for training a regression module with RegressionData. This function will pass the trainingData through any PreProcessing or FeatureExtraction modules that have been added to the GestureRecognitionPipeline, and then calls the training function of the regression module that has been added to the GestureRecognitionPipeline. The function will return true if the classifier was trained successfully, false otherwise.
const | RegressionData &trainingData: the labelled regression training data that will be used to train the regression module at the core of the pipeline |
Definition at line 619 of file GestureRecognitionPipeline.cpp.
bool GRT::GestureRecognitionPipeline::train | ( | const RegressionData & | trainingData, |
const UINT | kFoldValue | ||
) |
This is the main training interface for training a Regressifier with RegressionData using K-fold cross validation. This function will pass the trainingData through any PreProcessing or FeatureExtraction modules that have been added to the GestureRecognitionPipeline, and then calls the training function of the Regression module that has been added to the GestureRecognitionPipeline. The function will return true if the regressifier was trained successfully, false otherwise.
const | RegressionData &trainingData: the labelled regression training data that will be used to train the regressifier at the core of the pipeline |
const | UINT kFoldValue: the number of cross validation folds, this should be a value between in the range of [1 M-1], where M is the number of training samples in the LabelledRegressionData |
Train the classification system
Definition at line 714 of file GestureRecognitionPipeline.cpp.
bool GRT::GestureRecognitionPipeline::train | ( | const UnlabelledData & | trainingData | ) |
This is the main training interface for training a Clusterer with UnlabelledData using K-fold cross validation. This function will pass the trainingData through any PreProcessing or FeatureExtraction modules that have been added to the GestureRecognitionPipeline, and then calls the training function of the Clusterer module that has been added to the GestureRecognitionPipeline. The function will return true if the regressifier was trained successfully, false otherwise.
const | UnlabelledData &trainingData: the unlabelledData training data that will be used to train the clusterer at the core of the pipeline |
Definition at line 781 of file GestureRecognitionPipeline.cpp.
bool GRT::GestureRecognitionPipeline::updateContextModule | ( | bool | value, |
UINT | contextLevel = 0 , |
||
UINT | moduleIndex = 0 |
||
) |
Updates the context module at the specific contextLevel and moduleIndex. The user can specify the position at which the new module should be inserted into the list of context modules. The default position is to insert the new module at first contextLevel and first moduleIndex
UINT | contextLevel: the context level that contains the context module you want to update |
UINT | moduleIndex: the index of the module you want to update |
Definition at line 3085 of file GestureRecognitionPipeline.cpp.