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.
|
Public Types | |
enum | ContextLevels { START_OF_PIPELINE =0, AFTER_PREPROCESSING, AFTER_FEATURE_EXTRACTION, AFTER_CLASSIFIER, END_OF_PIPELINE, NUM_CONTEXT_LEVELS } |
Public Types inherited from MLBase | |
enum | BaseType { BASE_TYPE_NOT_SET =0, CLASSIFIER, REGRESSIFIER, CLUSTERER, PRE_PROCSSING, POST_PROCESSING, FEATURE_EXTRACTION, CONTEXT } |
Public Member Functions | |
GestureRecognitionPipeline (void) | |
GestureRecognitionPipeline (const GestureRecognitionPipeline &rhs) | |
virtual | ~GestureRecognitionPipeline (void) |
GestureRecognitionPipeline & | operator= (const GestureRecognitionPipeline &rhs) |
GestureRecognitionPipeline & | operator<< (const PreProcessing &module) |
GestureRecognitionPipeline & | operator<< (const FeatureExtraction &module) |
GestureRecognitionPipeline & | operator<< (const Classifier &module) |
GestureRecognitionPipeline & | operator<< (const Regressifier &module) |
GestureRecognitionPipeline & | operator<< (const Clusterer &module) |
GestureRecognitionPipeline & | operator<< (const PostProcessing &module) |
virtual bool | train_ (ClassificationData &trainingData) override |
virtual bool | train (const ClassificationData &trainingData, const UINT kFoldValue, const bool useStratifiedSampling=false) |
virtual bool | train_ (ClassificationData &trainingData, const UINT kFoldValue, const bool useStratifiedSampling=false) |
virtual bool | train_ (TimeSeriesClassificationData &trainingData) override |
virtual bool | train (const TimeSeriesClassificationData &trainingData, const UINT kFoldValue, const bool useStratifiedSampling=false) |
virtual bool | train_ (TimeSeriesClassificationData &trainingData, const UINT kFoldValue, const bool useStratifiedSampling=false) |
virtual bool | train_ (ClassificationDataStream &trainingData) override |
virtual bool | train_ (RegressionData &trainingData) override |
virtual bool | train_ (RegressionData &trainingData, RegressionData &validationData) override |
virtual bool | train (const RegressionData &trainingData, const UINT kFoldValue) |
virtual bool | train_ (RegressionData &trainingData, const UINT kFoldValue) |
virtual bool | train_ (UnlabelledData &trainingData) override |
virtual bool | test (const ClassificationData &testData) |
virtual bool | test (const TimeSeriesClassificationData &testData) |
virtual bool | test (const ClassificationDataStream &testData) |
virtual bool | test (const RegressionData &testData) |
virtual bool | predict_ (VectorFloat &inputVector) override |
virtual bool | predict_ (MatrixFloat &inputMatrix) override |
GRT_DEPRECATED_MSG ("map_(VectorFloat &inputVector) is deprecated, use predict_(VectorFloat &inputVector) instead", virtual bool map_(VectorFloat &inputVector) override) | |
virtual bool | reset () override |
virtual bool | clear () override |
virtual bool | clearModel () |
virtual bool | save (const std::string &filename) const override |
GRT_DEPRECATED_MSG ("savePipelineToFile(std::string filename) is deprecated, use save(std::string &filename) instead", bool savePipelineToFile(const std::string &filename) const ) | |
virtual bool | load (const std::string &filename) override |
GRT_DEPRECATED_MSG ("loadPipelineFromFile(std::string filename) is deprecated, use load(std::string &filename) instead", bool loadPipelineFromFile(const std::string &filename)) | |
bool | preProcessData (VectorFloat inputVector, bool computeFeatures=true) |
virtual bool | getIsInitialized () 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 |
Float | getMaximumLikelihood () const |
Float | getPhase () const |
Float | getTrainingSetAccuracy () const |
Float | getCrossValidationAccuracy () const |
Float | getTestAccuracy () const |
Float | getTestRMSError () const |
Float | getTestSSError () const |
Float | getTestFMeasure (const UINT classLabel) const |
Float | getTestPrecision (const UINT classLabel) const |
Float | getTestRecall (const UINT classLabel) const |
Float | getTestRejectionPrecision () const |
Float | getTestRejectionRecall () const |
Float | getTestTime () const |
Float | getTrainingTime () const |
Float | getTrainingRMSError () const |
Float | getTrainingSSError () const |
MatrixFloat | getTestConfusionMatrix () const |
Vector< TrainingResult > | getTrainingResults () const |
TestResult | getTestResults () const |
VectorFloat | getTestPrecision () const |
VectorFloat | getTestRecall () const |
VectorFloat | getTestFMeasure () const |
VectorFloat | getClassLikelihoods () const |
VectorFloat | getClassDistances () const |
VectorFloat | getNullRejectionThresholds () const |
VectorFloat | getRegressionData () const |
VectorFloat | getUnProcessedRegressionData () const |
VectorFloat | getPreProcessedData () const |
VectorFloat | getPreProcessedData (UINT moduleIndex) const |
VectorFloat | getFeatureExtractionData () const |
VectorFloat | 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 > | |
const T * | getPreProcessingModule (const UINT moduleIndex) const |
template<class T > | |
T * | getPreProcessingModule (const UINT moduleIndex) |
template<class T > | |
const T * | getFeatureExtractionModule (const UINT moduleIndex) const |
template<class T > | |
T * | getFeatureExtractionModule (const UINT moduleIndex) |
template<class T > | |
const T * | getClassifier () const |
template<class T > | |
T * | getClassifier () |
template<class T > | |
const T * | getRegressifier () const |
template<class T > | |
T * | getRegressifier () |
template<class T > | |
const T * | getCluster () const |
template<class T > | |
T * | getCluster () |
template<class T > | |
const T * | getPostProcessingModule (const UINT moduleIndex) const |
template<class T > | |
T * | getPostProcessingModule (const UINT moduleIndex) |
template<class T > | |
T *const | getContextModule (const UINT contextLevel, const UINT moduleIndex) const |
template<class T > | |
T * | getContextModule (const UINT contextLevel, const UINT moduleIndex) |
virtual std::string | getModelAsString () const override |
std::string | getPipelineModeAsString () const |
std::string | getInfo () const |
UINT | getPipelineModeFromString (std::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) |
GRT_DEPRECATED_MSG ("use clear() instead.", bool clearAll()) | |
bool | clearTestResults () |
bool | setInfo (const std::string &info) |
Public Member Functions inherited from MLBase | |
MLBase (const std::string &id="", const BaseType type=BASE_TYPE_NOT_SET) | |
virtual | ~MLBase (void) |
bool | copyMLBaseVariables (const MLBase *mlBase) |
virtual bool | train (ClassificationData trainingData) |
virtual bool | train (RegressionData trainingData) |
virtual bool | train (RegressionData trainingData, RegressionData validationData) |
virtual bool | train (TimeSeriesClassificationData trainingData) |
virtual bool | train (ClassificationDataStream trainingData) |
virtual bool | train (UnlabelledData trainingData) |
virtual bool | train (MatrixFloat data) |
virtual bool | train_ (MatrixFloat &data) |
virtual bool | predict (VectorFloat inputVector) |
virtual bool | predict (MatrixFloat inputMatrix) |
virtual bool | map (VectorFloat inputVector) |
virtual bool | map_ (VectorFloat &inputVector) |
virtual bool | print () const |
virtual bool | save (std::fstream &file) const |
virtual bool | load (std::fstream &file) |
GRT_DEPRECATED_MSG ("saveModelToFile(std::string filename) is deprecated, use save(const std::string &filename) instead", virtual bool saveModelToFile(const std::string &filename) const ) | |
GRT_DEPRECATED_MSG ("saveModelToFile(std::fstream &file) is deprecated, use save(std::fstream &file) instead", virtual bool saveModelToFile(std::fstream &file) const ) | |
GRT_DEPRECATED_MSG ("loadModelFromFile(std::string filename) is deprecated, use load(const std::string &filename) instead", virtual bool loadModelFromFile(const std::string &filename)) | |
GRT_DEPRECATED_MSG ("loadModelFromFile(std::fstream &file) is deprecated, use load(std::fstream &file) instead", virtual bool loadModelFromFile(std::fstream &file)) | |
virtual bool | getModel (std::ostream &stream) const |
DataType | getInputType () const |
DataType | getOutputType () const |
BaseType | getType () const |
UINT | getNumInputFeatures () const |
UINT | getNumInputDimensions () const |
UINT | getNumOutputDimensions () const |
UINT | getMinNumEpochs () const |
UINT | getMaxNumEpochs () const |
UINT | getBatchSize () const |
UINT | getNumRestarts () const |
UINT | getValidationSetSize () const |
UINT | getNumTrainingIterationsToConverge () const |
Float | getMinChange () const |
Float | getLearningRate () const |
Float | getRMSTrainingError () const |
GRT_DEPRECATED_MSG ("getRootMeanSquaredTrainingError() is deprecated, use getRMSTrainingError() instead", Float getRootMeanSquaredTrainingError() const ) | |
Float | getTotalSquaredTrainingError () const |
Float | getRMSValidationError () const |
Float | getValidationSetAccuracy () const |
VectorFloat | getValidationSetPrecision () const |
VectorFloat | getValidationSetRecall () const |
bool | getUseValidationSet () const |
bool | getRandomiseTrainingOrder () const |
bool | getTrained () const |
GRT_DEPRECATED_MSG ("getModelTrained() is deprecated, use getTrained() instead", bool getModelTrained() const ) | |
bool | getConverged () const |
bool | getScalingEnabled () const |
bool | getIsBaseTypeClassifier () const |
bool | getIsBaseTypeRegressifier () const |
bool | getIsBaseTypeClusterer () const |
bool | getTrainingLoggingEnabled () const |
bool | getTestingLoggingEnabled () const |
bool | enableScaling (const bool useScaling) |
bool | setMaxNumEpochs (const UINT maxNumEpochs) |
bool | setBatchSize (const UINT batchSize) |
bool | setMinNumEpochs (const UINT minNumEpochs) |
bool | setNumRestarts (const UINT numRestarts) |
bool | setMinChange (const Float minChange) |
bool | setLearningRate (const Float learningRate) |
bool | setUseValidationSet (const bool useValidationSet) |
bool | setValidationSetSize (const UINT validationSetSize) |
bool | setRandomiseTrainingOrder (const bool randomiseTrainingOrder) |
bool | setTrainingLoggingEnabled (const bool loggingEnabled) |
bool | setTestingLoggingEnabled (const bool loggingEnabled) |
bool | registerTrainingResultsObserver (Observer< TrainingResult > &observer) |
bool | registerTestResultsObserver (Observer< TestInstanceResult > &observer) |
bool | removeTrainingResultsObserver (const Observer< TrainingResult > &observer) |
bool | removeTestResultsObserver (const Observer< TestInstanceResult > &observer) |
bool | removeAllTrainingObservers () |
bool | removeAllTestObservers () |
bool | notifyTrainingResultsObservers (const TrainingResult &data) |
bool | notifyTestResultsObservers (const TestInstanceResult &data) |
MLBase * | getMLBasePointer () |
const MLBase * | getMLBasePointer () const |
Vector< TrainingResult > | getTrainingResults () const |
Public Member Functions inherited from GRTBase | |
GRTBase (const std::string &id="") | |
virtual | ~GRTBase (void) |
bool | copyGRTBaseVariables (const GRTBase *GRTBase) |
GRT_DEPRECATED_MSG ("getClassType is deprecated, use getId() instead!", std::string getClassType() const ) | |
std::string | getId () const |
std::string | getLastWarningMessage () const |
std::string | getLastErrorMessage () const |
std::string | getLastInfoMessage () const |
bool | setInfoLoggingEnabled (const bool loggingEnabled) |
bool | setWarningLoggingEnabled (const bool loggingEnabled) |
bool | setErrorLoggingEnabled (const bool loggingEnabled) |
bool | setDebugLoggingEnabled (const bool loggingEnabled) |
GRTBase * | getGRTBasePointer () |
const GRTBase * | getGRTBasePointer () const |
Float | scale (const Float &x, const Float &minSource, const Float &maxSource, const Float &minTarget, const Float &maxTarget, const bool constrain=false) |
Float | SQR (const Float &x) const |
Public Member Functions inherited from Observer< TrainingResult > | |
virtual void | notify (const TrainingResult &data) |
Public Member Functions inherited from Observer< TestInstanceResult > | |
virtual void | notify (const TestInstanceResult &data) |
Protected Types | |
enum | PipelineModes { PIPELINE_MODE_NOT_SET =0, CLASSIFICATION_MODE, REGRESSION_MODE, CLUSTER_MODE } |
Protected Member Functions | |
bool | init () |
bool | predict_classifier (const VectorFloat &inputVector) |
bool | predict_timeseries (const MatrixFloat &input) |
bool | predict_frame (const MatrixFloat &input) |
bool | predict_regressifier (const VectorFloat &inputVector) |
bool | predict_clusterer (const VectorFloat &inputVector) |
void | deleteAllPreProcessingModules () |
void | deleteAllFeatureExtractionModules () |
void | deleteClassifier () |
void | deleteRegressifier () |
void | deleteClusterer () |
void | deleteAllPostProcessingModules () |
void | deleteAllContextModules () |
bool | updateTestMetrics (const UINT classLabel, const UINT predictedClassLabel, VectorFloat &precisionCounter, VectorFloat &recallCounter, Float &rejectionPrecisionCounter, Float &rejectionRecallCounter, VectorFloat &confusionMatrixCounter) |
bool | computeTestMetrics (VectorFloat &precisionCounter, VectorFloat &recallCounter, Float &rejectionPrecisionCounter, Float &rejectionRecallCounter, VectorFloat &confusionMatrixCounter, const UINT numTestSamples) |
Protected Member Functions inherited from MLBase | |
bool | saveBaseSettingsToFile (std::fstream &file) const |
bool | loadBaseSettingsFromFile (std::fstream &file) |
Protected Attributes | |
bool | initialized |
std::string | info |
UINT | inputVectorDimensions |
UINT | outputVectorDimensions |
UINT | predictedClassLabel |
UINT | predictedClusterLabel |
UINT | pipelineMode |
UINT | predictionModuleIndex |
UINT | numTrainingSamples |
UINT | numTestSamples |
Float | testAccuracy |
Float | testRMSError |
Float | testSquaredError |
Float | testTime |
Float | trainingTime |
VectorFloat | testFMeasure |
VectorFloat | testPrecision |
VectorFloat | testRecall |
VectorFloat | regressionData |
Float | testRejectionPrecision |
Float | testRejectionRecall |
MatrixFloat | 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 |
Protected Attributes inherited from MLBase | |
bool | trained |
bool | useScaling |
bool | converged |
DataType | inputType |
DataType | outputType |
BaseType | baseType |
UINT | numInputDimensions |
UINT | numOutputDimensions |
UINT | numTrainingIterationsToConverge |
UINT | minNumEpochs |
UINT | maxNumEpochs |
UINT | batchSize |
UINT | validationSetSize |
UINT | numRestarts |
Float | learningRate |
Float | minChange |
Float | rmsTrainingError |
Float | rmsValidationError |
Float | totalSquaredTrainingError |
Float | validationSetAccuracy |
bool | useValidationSet |
bool | randomiseTrainingOrder |
VectorFloat | validationSetPrecision |
VectorFloat | validationSetRecall |
Random | random |
Vector< TrainingResult > | trainingResults |
TrainingResultsObserverManager | trainingResultsObserverManager |
TestResultsObserverManager | testResultsObserverManager |
TrainingLog | trainingLog |
TestingLog | testingLog |
Protected Attributes inherited from GRTBase | |
std::string | classId |
Stores the name of the class (e.g., MinDist) | |
DebugLog | debugLog |
ErrorLog | errorLog |
InfoLog | infoLog |
WarningLog | warningLog |
Additional Inherited Members | |
Static Public Member Functions inherited from GRTBase | |
static std::string | getGRTVersion (bool returnRevision=true) |
static std::string | getGRTRevison () |
Definition at line 53 of file GestureRecognitionPipeline.h.
GRT_BEGIN_NAMESPACE GestureRecognitionPipeline::GestureRecognitionPipeline | ( | void | ) |
Default Constructor
Definition at line 26 of file GestureRecognitionPipeline.cpp.
GestureRecognitionPipeline::GestureRecognitionPipeline | ( | const GestureRecognitionPipeline & | rhs | ) |
Copy Constructor. Performs a depp copy of the data from the rhs pipeline into this pipeline.
Definition at line 31 of file GestureRecognitionPipeline.cpp.
|
virtual |
Default Destructor
Definition at line 141 of file GestureRecognitionPipeline.cpp.
bool 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.
contextModule | a reference to the context module that you want to add |
contextLevel | the context level where you want to add the new context module |
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 3272 of file GestureRecognitionPipeline.cpp.
bool 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.
featureExtractionModule | a reference to the feature extraction module you want to add |
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 3092 of file GestureRecognitionPipeline.cpp.
bool 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.
postProcessingModule | a reference to the post processing module you want to add |
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 3235 of file GestureRecognitionPipeline.cpp.
bool 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.
preProcessingModule | a reference to the pre processing module you want to add |
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 3054 of file GestureRecognitionPipeline.cpp.
|
overridevirtual |
This function is the main interface for clearing the entire gesture recognition pipeline. This function will remove any module added to the pipeline and set it back to its default state.
Reimplemented from MLBase.
Definition at line 2108 of file GestureRecognitionPipeline.cpp.
|
virtual |
This function is the main interface for clearing any trained model stored by the gesture recognition pipeline. This function will call clear on all the modules in the pipeline, but unlike the clear() function, it will not remove the modules.
Definition at line 2124 of file GestureRecognitionPipeline.cpp.
bool GestureRecognitionPipeline::clearTestResults | ( | ) |
Resets all the test results to zero.
Definition at line 3414 of file GestureRecognitionPipeline.cpp.
VectorFloat 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 2930 of file GestureRecognitionPipeline.cpp.
Classifier * GestureRecognitionPipeline::getClassifier | ( | ) | const |
Gets a pointer to the classifier module.
Definition at line 3020 of file GestureRecognitionPipeline.cpp.
|
inline |
Gets a const 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 971 of file GestureRecognitionPipeline.h.
|
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 988 of file GestureRecognitionPipeline.h.
Vector< UINT > 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 2985 of file GestureRecognitionPipeline.cpp.
VectorFloat 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 2924 of file GestureRecognitionPipeline.cpp.
|
inline |
Gets a const 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 1039 of file GestureRecognitionPipeline.h.
|
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 1056 of file GestureRecognitionPipeline.h.
Clusterer * GestureRecognitionPipeline::getClusterer | ( | ) | const |
Gets a pointer to the clusterer module.
Definition at line 3028 of file GestureRecognitionPipeline.cpp.
Context * GestureRecognitionPipeline::getContextModule | ( | const UINT | contextLevel, |
const UINT | moduleIndex | ||
) | const |
Gets a pointer to the context module at the specific contextLevel and moduleIndex.
contextLevel | the context level that contains the context module you want |
moduleIndex | the index of the context module you want |
Definition at line 3040 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.
contextLevel | the context level that contains the context module you want |
moduleIndex | the index of the context module you want |
Definition at line 1108 of file GestureRecognitionPipeline.h.
|
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.
contextLevel | the context level that contains the context module you want |
moduleIndex | the index of the context module you want |
Definition at line 1130 of file GestureRecognitionPipeline.h.
Float 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 2801 of file GestureRecognitionPipeline.cpp.
Vector< TestResult > 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 3000 of file GestureRecognitionPipeline.cpp.
VectorFloat 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 2968 of file GestureRecognitionPipeline.cpp.
VectorFloat 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 2975 of file GestureRecognitionPipeline.cpp.
FeatureExtraction * 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 3012 of file GestureRecognitionPipeline.cpp.
|
inline |
Gets a const 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.
moduleIndex | the index of the feature extraction module you want |
Definition at line 933 of file GestureRecognitionPipeline.h.
|
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.
moduleIndex | the index of the feature extraction module you want |
Definition at line 952 of file GestureRecognitionPipeline.h.
UINT 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 2690 of file GestureRecognitionPipeline.cpp.
bool GestureRecognitionPipeline::getIsClassifierSet | ( | ) | const |
This function returns true if a classifier has been added to the pipeline.
Definition at line 2655 of file GestureRecognitionPipeline.cpp.
bool GestureRecognitionPipeline::getIsClustererSet | ( | ) | const |
This function returns true if a clusterer has been added to the pipeline.
Definition at line 2663 of file GestureRecognitionPipeline.cpp.
bool GestureRecognitionPipeline::getIsContextSet | ( | ) | const |
This function returns true if any context modules have been added to the pipeline.
Definition at line 2671 of file GestureRecognitionPipeline.cpp.
bool GestureRecognitionPipeline::getIsFeatureExtractionSet | ( | ) | const |
This function returns true if any feature extraction modules have been added to the pipeline.
Definition at line 2651 of file GestureRecognitionPipeline.cpp.
|
virtual |
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 2643 of file GestureRecognitionPipeline.cpp.
bool 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 2682 of file GestureRecognitionPipeline.cpp.
bool 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 2686 of file GestureRecognitionPipeline.cpp.
bool GestureRecognitionPipeline::getIsPipelineModeSet | ( | ) | const |
This function returns true if either a classifier or regressifier has been added to the pipeline.
Definition at line 2678 of file GestureRecognitionPipeline.cpp.
bool GestureRecognitionPipeline::getIsPostProcessingSet | ( | ) | const |
This function returns true if any post processing modules have been added to the pipeline.
Definition at line 2667 of file GestureRecognitionPipeline.cpp.
bool GestureRecognitionPipeline::getIsPreProcessingSet | ( | ) | const |
This function returns true if any preprocessing modules have been added to the pipeline.
Definition at line 2647 of file GestureRecognitionPipeline.cpp.
bool GestureRecognitionPipeline::getIsRegressifierSet | ( | ) | const |
This function returns true if a regressifier has been added to the pipeline.
Definition at line 2659 of file GestureRecognitionPipeline.cpp.
Float 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 2777 of file GestureRecognitionPipeline.cpp.
|
overridevirtual |
Gets the pipeline model as a string. This includes any classification or regression model, but also any preprocessing, feature extraction or post processing settings.
Reimplemented from MLBase.
Definition at line 3669 of file GestureRecognitionPipeline.cpp.
VectorFloat 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 2936 of file GestureRecognitionPipeline.cpp.
UINT 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 2721 of file GestureRecognitionPipeline.cpp.
UINT GestureRecognitionPipeline::getNumClassesInModel | ( | ) | const |
This function is now depreciated. You should use getNumClasses() instead.
Definition at line 2717 of file GestureRecognitionPipeline.cpp.
UINT GestureRecognitionPipeline::getNumFeatureExtractionModules | ( | ) | const |
This function returns the number of feature extraction modules that have been added to the pipeline.
Definition at line 2736 of file GestureRecognitionPipeline.cpp.
UINT GestureRecognitionPipeline::getNumPostProcessingModules | ( | ) | const |
This function returns the number of post processing modules that have been added to the pipeline.
Definition at line 2740 of file GestureRecognitionPipeline.cpp.
UINT GestureRecognitionPipeline::getNumPreProcessingModules | ( | ) | const |
This function returns the number of preprocessing modules that have been added to the pipeline.
Definition at line 2732 of file GestureRecognitionPipeline.cpp.
UINT GestureRecognitionPipeline::getNumTestSamples | ( | ) | const |
This function returns the number of test samples used to train the pipeline model.
Definition at line 2773 of file GestureRecognitionPipeline.cpp.
UINT GestureRecognitionPipeline::getNumTrainingSamples | ( | ) | const |
This function returns the number of training samples used to train the pipeline model.
Definition at line 2769 of file GestureRecognitionPipeline.cpp.
UINT 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 2709 of file GestureRecognitionPipeline.cpp.
Float 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 2787 of file GestureRecognitionPipeline.cpp.
std::string 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 3694 of file GestureRecognitionPipeline.cpp.
UINT GestureRecognitionPipeline::getPipelineModeFromString | ( | std::string | pipelineMode | ) | const |
Converts a string to the pipeline mode.
pipelineMode | the pipeline mode as a string, i.e. "CLASSIFICATION_MODE" |
Definition at line 3717 of file GestureRecognitionPipeline.cpp.
PostProcessing * GestureRecognitionPipeline::getPostProcessingModule | ( | UINT | moduleIndex | ) | const |
Gets a pointer to the post processing module at the specific moduleIndex.
moduleIndex | the index of the post processing module you want |
Definition at line 3032 of file GestureRecognitionPipeline.cpp.
|
inline |
Gets a const 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.
moduleIndex | the index of the post processing module you want |
Definition at line 1073 of file GestureRecognitionPipeline.h.
|
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.
moduleIndex | the index of the post processing module you want |
Definition at line 1090 of file GestureRecognitionPipeline.h.
UINT 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 2748 of file GestureRecognitionPipeline.cpp.
UINT 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 2744 of file GestureRecognitionPipeline.cpp.
VectorFloat 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 2952 of file GestureRecognitionPipeline.cpp.
VectorFloat 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 2959 of file GestureRecognitionPipeline.cpp.
PreProcessing * 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 3004 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.
moduleIndex | the index of the pre processing module you want |
Definition at line 895 of file GestureRecognitionPipeline.h.
|
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.
moduleIndex | the index of the pre processing module you want |
Definition at line 914 of file GestureRecognitionPipeline.h.
Regressifier * GestureRecognitionPipeline::getRegressifier | ( | ) | const |
Gets a pointer to the regressifier module.
Definition at line 3024 of file GestureRecognitionPipeline.cpp.
|
inline |
Gets a const 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 1005 of file GestureRecognitionPipeline.h.
|
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 1022 of file GestureRecognitionPipeline.h.
VectorFloat 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 2941 of file GestureRecognitionPipeline.cpp.
Float 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 2805 of file GestureRecognitionPipeline.cpp.
MatrixFloat 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 2880 of file GestureRecognitionPipeline.cpp.
Float 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.
classLabel | the label of the class you want to get the test fMeasure value for |
Definition at line 2817 of file GestureRecognitionPipeline.cpp.
VectorFloat 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 2920 of file GestureRecognitionPipeline.cpp.
Vector< TestInstanceResult > 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 2996 of file GestureRecognitionPipeline.cpp.
Float 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.
classLabel | the label of the class you want to get the test precision value for |
Definition at line 2830 of file GestureRecognitionPipeline.cpp.
VectorFloat 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 2912 of file GestureRecognitionPipeline.cpp.
Float 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.
classLabel | the label of the class you want to get the test recall value for |
Definition at line 2843 of file GestureRecognitionPipeline.cpp.
VectorFloat 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 2916 of file GestureRecognitionPipeline.cpp.
Float 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 2856 of file GestureRecognitionPipeline.cpp.
Float 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 2860 of file GestureRecognitionPipeline.cpp.
TestResult 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 2894 of file GestureRecognitionPipeline.cpp.
Float 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 2809 of file GestureRecognitionPipeline.cpp.
Float 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 2813 of file GestureRecognitionPipeline.cpp.
Float GestureRecognitionPipeline::getTestTime | ( | ) | const |
This function returns the total test time (in milliseconds) for the most recent test.
Definition at line 2864 of file GestureRecognitionPipeline.cpp.
Vector< TrainingResult > GestureRecognitionPipeline::getTrainingResults | ( | ) | const |
This function returns the results from the most recent round of training. The TrainingResults vector contains the results for each epoch of training, such as the accuracy, error, RMSError, etc.. The exact contents of the TrainingResults data will vary based on the actual ML algorithm at the core of the pipeline.
Definition at line 2884 of file GestureRecognitionPipeline.cpp.
Float 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 2872 of file GestureRecognitionPipeline.cpp.
Float GestureRecognitionPipeline::getTrainingSetAccuracy | ( | ) | const |
This function returns the estimated training set accuracy from the most recent round of training. This value is only relevant if the classifier has been trained.
Definition at line 2794 of file GestureRecognitionPipeline.cpp.
Float 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 2876 of file GestureRecognitionPipeline.cpp.
Float GestureRecognitionPipeline::getTrainingTime | ( | ) | const |
This function returns the total training time (in milliseconds) for the most recent training.
Definition at line 2868 of file GestureRecognitionPipeline.cpp.
UINT 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 2759 of file GestureRecognitionPipeline.cpp.
VectorFloat 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 2945 of file GestureRecognitionPipeline.cpp.
GestureRecognitionPipeline::GRT_DEPRECATED_MSG | ( | "map_(VectorFloat &inputVector) is | deprecated, |
use predict_(VectorFloat &inputVector) instead" | , | ||
virtual bool map_(VectorFloat &inputVector) | override | ||
) |
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.
inputVector | the input data that will be passed through the pipeline for regression |
GestureRecognitionPipeline::GRT_DEPRECATED_MSG | ( | "savePipelineToFile(std::string filename) is | deprecated, |
use save(std::string &filename) instead" | , | ||
bool savePipelineToFile(const std::string &filename) | const | ||
) |
filename | the name of the file you want to save the pipeline to |
GestureRecognitionPipeline::GRT_DEPRECATED_MSG | ( | "loadPipelineFromFile(std::string filename) is | deprecated, |
use load(std::string &filename) instead" | , | ||
bool | loadPipelineFromFileconst std::string &filename | ||
) |
filename | the name of the file you want to load the pipeline from |
GestureRecognitionPipeline::GRT_DEPRECATED_MSG | ( | "use clear() instead." | , |
bool | clearAll() | ||
) |
|
overridevirtual |
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
filename | the name of the file you want to load the pipeline from |
Reimplemented from MLBase.
Definition at line 2308 of file GestureRecognitionPipeline.cpp.
GestureRecognitionPipeline & GestureRecognitionPipeline::operator<< | ( | const PreProcessing & | module | ) |
Adds the preprocessing module to the pipeline, this is the same as calling addPreProcessingModule( module )
module | the preprocessing module you want to add |
Definition at line 111 of file GestureRecognitionPipeline.cpp.
GestureRecognitionPipeline & GestureRecognitionPipeline::operator<< | ( | const FeatureExtraction & | module | ) |
Adds the feature extraction module to the pipeline, this is the same as calling addFeatureExtractionModule( module )
module | the feature extraction module you want to add |
Definition at line 116 of file GestureRecognitionPipeline.cpp.
GestureRecognitionPipeline & GestureRecognitionPipeline::operator<< | ( | const Classifier & | module | ) |
Adds the classifier to the pipeline, this is the same as calling setClassifier( module )
module | the classifier you want to add |
Definition at line 121 of file GestureRecognitionPipeline.cpp.
GestureRecognitionPipeline & GestureRecognitionPipeline::operator<< | ( | const Regressifier & | module | ) |
Adds the regressifier to the pipeline, this is the same as calling setRegressifier( module )
module | the regressifier you want to add |
Definition at line 126 of file GestureRecognitionPipeline.cpp.
GestureRecognitionPipeline & GestureRecognitionPipeline::operator<< | ( | const Clusterer & | module | ) |
Adds the clusterer to the pipeline, this is the same as calling setClusterer( module )
module | the clusterer you want to add |
Definition at line 131 of file GestureRecognitionPipeline.cpp.
GestureRecognitionPipeline & GestureRecognitionPipeline::operator<< | ( | const PostProcessing & | module | ) |
Adds the postprocessing module to the pipeline, this is the same as calling addPostProcessingModule( module )
module | the postprocessing module you want to add |
Definition at line 136 of file GestureRecognitionPipeline.cpp.
GestureRecognitionPipeline & GestureRecognitionPipeline::operator= | ( | const GestureRecognitionPipeline & | rhs | ) |
Equals Constructor. Performs a depp copy of the data from the rhs pipeline into this pipeline.
Definition at line 39 of file GestureRecognitionPipeline.cpp.
|
overridevirtual |
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.
inputVector | the input data that will be passed through the pipeline for classification or regression |
Reimplemented from MLBase.
Definition at line 1342 of file GestureRecognitionPipeline.cpp.
|
overridevirtual |
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.
inputMatrix | the input atrix that will be passed through the pipeline for classification |
Reimplemented from MLBase.
Definition at line 1372 of file GestureRecognitionPipeline.cpp.
bool GestureRecognitionPipeline::preProcessData | ( | VectorFloat | 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.
inputVector | the input data that should be processed |
computeFeatures | sets if just the preprocessing modules should be used (false), or both the preprocessing and feature extraction modules should be used (true) |
Definition at line 2605 of file GestureRecognitionPipeline.cpp.
bool 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 3409 of file GestureRecognitionPipeline.cpp.
bool 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 3347 of file GestureRecognitionPipeline.cpp.
bool 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 3369 of file GestureRecognitionPipeline.cpp.
bool 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 3325 of file GestureRecognitionPipeline.cpp.
|
inline |
Removes the classifier from the current pipeline.
Definition at line 1309 of file GestureRecognitionPipeline.h.
|
inline |
Removes the clusterer from the current pipeline.
Definition at line 1323 of file GestureRecognitionPipeline.h.
bool 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.
contextLevel | the context level that contains the specific context module you want to remove |
moduleIndex | the index of the context module you want to remove |
Definition at line 3391 of file GestureRecognitionPipeline.cpp.
bool 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.
moduleIndex | the index of the module you want to remove |
Definition at line 3352 of file GestureRecognitionPipeline.cpp.
bool 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.
moduleIndex | the index of the module you want to remove |
Definition at line 3374 of file GestureRecognitionPipeline.cpp.
bool 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.
moduleIndex | the index of the module you want to remove |
Definition at line 3330 of file GestureRecognitionPipeline.cpp.
|
inline |
Removes the regressifier from the current pipeline.
Definition at line 1316 of file GestureRecognitionPipeline.h.
|
overridevirtual |
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.
Reimplemented from MLBase.
Definition at line 2047 of file GestureRecognitionPipeline.cpp.
|
overridevirtual |
This function will save the entire pipeline to a file. This includes all the modules types, settings, and models.
filename | the name of the file you want to save the pipeline to |
Reimplemented from MLBase.
Definition at line 2171 of file GestureRecognitionPipeline.cpp.
bool 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.
classifier | a reference to the classifier module you want to add to the pipeline |
Definition at line 3130 of file GestureRecognitionPipeline.cpp.
bool 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.
regressifier | a reference to the regression module you want to add to the pipeline |
Definition at line 3202 of file GestureRecognitionPipeline.cpp.
bool GestureRecognitionPipeline::setFeatureExtractionModule | ( | const FeatureExtraction & | featureExtractionModule | ) |
This function removes any existing feature extraction modules, then it adds the new feature extraction module.
featureExtractionModule | a reference to the feature extraction module you want to add |
Definition at line 3125 of file GestureRecognitionPipeline.cpp.
bool GestureRecognitionPipeline::setInfo | ( | const std::string & | info | ) |
Sets the pipeline's info text.
Definition at line 3433 of file GestureRecognitionPipeline.cpp.
bool GestureRecognitionPipeline::setPostProcessingModule | ( | const PostProcessing & | postProcessingModule | ) |
This function removes any existing post processing modules, then it adds the new post processing module.
postProcessingModule | a reference to the post processing module you want to add |
Definition at line 3267 of file GestureRecognitionPipeline.cpp.
bool GestureRecognitionPipeline::setPreProcessingModule | ( | const PreProcessing & | preProcessingModule | ) |
This function removes any existing pre processing modules, then it adds the new pre processing module.
preProcessingModule | a reference to the pre processing module you want to add |
Definition at line 3087 of file GestureRecognitionPipeline.cpp.
bool 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.
regressifier | a reference to the regression module you want to add to the pipeline |
Definition at line 3169 of file GestureRecognitionPipeline.cpp.
|
virtual |
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.
testData | the labelled classification data that will be used to test the accuracy of the pipeline |
Definition at line 972 of file GestureRecognitionPipeline.cpp.
|
virtual |
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.
testData | the labelled timeseries classification data that will be used to test the accuracy of the pipeline |
Definition at line 1085 of file GestureRecognitionPipeline.cpp.
|
virtual |
This function is the main interface for testing the accuracy of a pipeline with ClassificationDataStream. 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.
testData | the timeseries classification data stream that will be used to test the accuracy of the pipeline |
Definition at line 1164 of file GestureRecognitionPipeline.cpp.
|
virtual |
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.
testData | the labelled regression data that will be used to test the accuracy of the pipeline |
Definition at line 1268 of file GestureRecognitionPipeline.cpp.
|
virtual |
This is the main training interface for training a Classifier with ClassificationData using K-fold cross validation. This function calls train_(...), so if you want to use a more efficient version of the algorithm (and don't care that your training data may get modified) then call train_(...) directly.
trainingData | the classification training data that will be used to train the classifier at the core of the pipeline |
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 |
useStratifiedSampling | sets if stratified sampling should be used during the cross validation training |
Definition at line 252 of file GestureRecognitionPipeline.cpp.
|
virtual |
This is the main training interface for training a Classifier with TimeSeriesClassificationData using K-fold cross validation. This function calls train_(...), so if you want to use a more efficient version of the algorithm (and don't care that your training data may get modified) then call train_(...) directly.
trainingData | the labelled time-series classification training data that will be used to train the classifier at the core of the pipeline |
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 |
useStratifiedSampling | sets if stratified sampling should be used during the cross validation training |
Definition at line 525 of file GestureRecognitionPipeline.cpp.
|
virtual |
This is the main training interface for training a Regressifier with RegressionData using K-fold cross validation. This function calls train_(...), so if you want to use a more efficient version of the algorithm (and don't care that your training data may get modified) then call train_(...) directly.
trainingData | the regression training data that will be used to train the regressifier at the core of the pipeline |
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 |
Definition at line 799 of file GestureRecognitionPipeline.cpp.
|
overridevirtual |
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.
trainingData | the classification data that will be used to train the classifier at the core of the pipeline |
Reimplemented from MLBase.
Definition at line 147 of file GestureRecognitionPipeline.cpp.
|
virtual |
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.
trainingData | the labelled classification training data that will be used to train the classifier at the core of the pipeline |
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 |
useStratifiedSampling | sets if stratified sampling should be used during the cross validation training |
Train the classification system
Definition at line 258 of file GestureRecognitionPipeline.cpp.
|
overridevirtual |
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.
trainingData | the time-series classification training data that will be used to train the classifier at the core of the pipeline |
Reimplemented from MLBase.
Definition at line 325 of file GestureRecognitionPipeline.cpp.
|
virtual |
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.
trainingData | the labelled time-series classification training data that will be used to train the classifier at the core of the pipeline |
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 |
useStratifiedSampling | sets if stratified sampling should be used during the cross validation training |
Train the classification system
Definition at line 531 of file GestureRecognitionPipeline.cpp.
|
overridevirtual |
This is the main training interface for training a Classifier with ClassificationDataStream. 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.
trainingData | the time-series classification training data that will be used to train the classifier at the core of the pipeline |
Reimplemented from MLBase.
Definition at line 597 of file GestureRecognitionPipeline.cpp.
|
overridevirtual |
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.
trainingData | the labelled regression training data that will be used to train the regression module at the core of the pipeline |
Reimplemented from MLBase.
Definition at line 702 of file GestureRecognitionPipeline.cpp.
|
overridevirtual |
This is the main training interface for training a regression module with a regression training and validation dataset. This function will pass the training and validataion 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.
trainingData | the regression training data that will be used to train the regression module at the core of the pipeline |
validationData | the regression validation data that will be used to validate the regression module at the core of the pipeline |
Reimplemented from MLBase.
Definition at line 797 of file GestureRecognitionPipeline.cpp.
|
virtual |
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.
trainingData | the regression training data that will be used to train the regressifier at the core of the pipeline |
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 805 of file GestureRecognitionPipeline.cpp.
|
overridevirtual |
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.
trainingData | the unlabelledData training data that will be used to train the clusterer at the core of the pipeline |
Reimplemented from MLBase.
Definition at line 869 of file GestureRecognitionPipeline.cpp.
bool 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
contextLevel | the context level that contains the context module you want to update |
moduleIndex | the index of the module you want to update |
Definition at line 3308 of file GestureRecognitionPipeline.cpp.