![]() |
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 Member Functions | |
HierarchicalClustering () | |
HierarchicalClustering (const HierarchicalClustering &rhs) | |
virtual | ~HierarchicalClustering () |
HierarchicalClustering & | operator= (const HierarchicalClustering &rhs) |
virtual bool | deepCopyFrom (const Clusterer *clusterer) |
virtual bool | reset () |
virtual bool | clear () |
virtual bool | train_ (MatrixDouble &data) |
virtual bool | train_ (ClassificationData &trainingData) |
virtual bool | train_ (UnlabelledData &trainingData) |
virtual bool | saveModelToFile (fstream &file) const |
virtual bool | loadModelFromFile (fstream &file) |
bool | printModel () |
vector< ClusterLevel > | getClusters () |
![]() | |
Clusterer (void) | |
virtual | ~Clusterer (void) |
bool | copyBaseVariables (const Clusterer *Clusterer) |
bool | getConverged () const |
UINT | getNumClusters () const |
UINT | getPredictedClusterLabel () const |
double | getMaximumLikelihood () const |
double | getBestDistance () const |
VectorDouble | getClusterLikelihoods () const |
VectorDouble | getClusterDistances () const |
vector< UINT > | getClusterLabels () const |
string | getClustererType () const |
bool | setNumClusters (const UINT numClusters) |
Clusterer * | createNewInstance () const |
Clusterer * | deepCopy () const |
const Clusterer & | getBaseClusterer () const |
![]() | |
MLBase (void) | |
virtual | ~MLBase (void) |
bool | copyMLBaseVariables (const MLBase *mlBase) |
virtual bool | train (ClassificationData trainingData) |
virtual bool | train (RegressionData trainingData) |
virtual bool | train_ (RegressionData &trainingData) |
virtual bool | train (TimeSeriesClassificationData trainingData) |
virtual bool | train_ (TimeSeriesClassificationData &trainingData) |
virtual bool | train (TimeSeriesClassificationDataStream trainingData) |
virtual bool | train_ (TimeSeriesClassificationDataStream &trainingData) |
virtual bool | train (UnlabelledData trainingData) |
virtual bool | train (MatrixDouble data) |
virtual bool | predict (VectorDouble inputVector) |
virtual bool | predict_ (VectorDouble &inputVector) |
virtual bool | predict (MatrixDouble inputMatrix) |
virtual bool | predict_ (MatrixDouble &inputMatrix) |
virtual bool | map (VectorDouble inputVector) |
virtual bool | map_ (VectorDouble &inputVector) |
virtual bool | print () const |
virtual bool | save (const string filename) const |
virtual bool | load (const string filename) |
virtual bool | saveModelToFile (string filename) const |
virtual bool | loadModelFromFile (string filename) |
virtual bool | getModel (ostream &stream) const |
double | scale (const double &x, const double &minSource, const double &maxSource, const double &minTarget, const double &maxTarget, const bool constrain=false) |
virtual string | getModelAsString () const |
UINT | getBaseType () const |
UINT | getNumInputFeatures () const |
UINT | getNumInputDimensions () const |
UINT | getNumOutputDimensions () const |
UINT | getMinNumEpochs () const |
UINT | getMaxNumEpochs () const |
UINT | getValidationSetSize () const |
UINT | getNumTrainingIterationsToConverge () const |
double | getMinChange () const |
double | getLearningRate () const |
double | getRootMeanSquaredTrainingError () const |
double | getTotalSquaredTrainingError () const |
bool | getUseValidationSet () const |
bool | getRandomiseTrainingOrder () const |
bool | getTrained () const |
bool | getModelTrained () const |
bool | getScalingEnabled () const |
bool | getIsBaseTypeClassifier () const |
bool | getIsBaseTypeRegressifier () const |
bool | getIsBaseTypeClusterer () const |
bool | enableScaling (bool useScaling) |
bool | setMaxNumEpochs (const UINT maxNumEpochs) |
bool | setMinNumEpochs (const UINT minNumEpochs) |
bool | setMinChange (const double minChange) |
bool | setLearningRate (double learningRate) |
bool | setUseValidationSet (const bool useValidationSet) |
bool | setValidationSetSize (const UINT validationSetSize) |
bool | setRandomiseTrainingOrder (const bool randomiseTrainingOrder) |
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 |
![]() | |
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 |
![]() | |
virtual void | notify (const TrainingResult &data) |
![]() | |
virtual void | notify (const TestInstanceResult &data) |
Protected Member Functions | |
double | SQR (const double &a) |
double | squaredEuclideanDistance (const double *a, const double *b) |
double | computeClusterDistance (const ClusterInfo &clusterA, const ClusterInfo &clusterB) |
double | computeClusterVariance (const ClusterInfo &cluster, const MatrixDouble &data) |
![]() | |
bool | saveClustererSettingsToFile (fstream &file) const |
bool | loadClustererSettingsFromFile (fstream &file) |
![]() | |
bool | saveBaseSettingsToFile (fstream &file) const |
bool | loadBaseSettingsFromFile (fstream &file) |
![]() | |
double | SQR (const double &x) const |
Protected Attributes | |
UINT | M |
UINT | N |
vector< ClusterLevel > | clusters |
MatrixDouble | distanceMatrix |
![]() | |
string | clustererType |
UINT | numClusters |
Number of clusters in the model. | |
UINT | predictedClusterLabel |
Stores the predicted cluster label from the most recent predict( ) | |
double | maxLikelihood |
double | bestDistance |
VectorDouble | clusterLikelihoods |
VectorDouble | clusterDistances |
vector< UINT > | clusterLabels |
bool | converged |
vector< MinMax > | ranges |
![]() | |
bool | trained |
bool | useScaling |
UINT | baseType |
UINT | numInputDimensions |
UINT | numOutputDimensions |
UINT | numTrainingIterationsToConverge |
UINT | minNumEpochs |
UINT | maxNumEpochs |
UINT | validationSetSize |
double | learningRate |
double | minChange |
double | rootMeanSquaredTrainingError |
double | totalSquaredTrainingError |
bool | useValidationSet |
bool | randomiseTrainingOrder |
Random | random |
vector< TrainingResult > | trainingResults |
TrainingResultsObserverManager | trainingResultsObserverManager |
TestResultsObserverManager | testResultsObserverManager |
![]() | |
string | classType |
DebugLog | debugLog |
ErrorLog | errorLog |
InfoLog | infoLog |
TrainingLog | trainingLog |
TestingLog | testingLog |
WarningLog | warningLog |
Additional Inherited Members | |
![]() | |
typedef std::map< string, Clusterer *(*)() > | StringClustererMap |
![]() | |
enum | BaseTypes { BASE_TYPE_NOT_SET =0, CLASSIFIER, REGRESSIFIER, CLUSTERER } |
![]() | |
static Clusterer * | createInstanceFromString (string const &ClustererType) |
static vector< string > | getRegisteredClusterers () |
![]() | |
static string | getGRTVersion (bool returnRevision=true) |
static string | getGRTRevison () |
![]() | |
static StringClustererMap * | getMap () |
Definition at line 134 of file HierarchicalClustering.h.
GRT::HierarchicalClustering::HierarchicalClustering | ( | ) |
Default Constructor.
Definition at line 28 of file HierarchicalClustering.cpp.
GRT::HierarchicalClustering::HierarchicalClustering | ( | const HierarchicalClustering & | rhs | ) |
Defines how the data from the rhs instance should be copied to this instance
const | HierarchicalClustering &rhs: another instance of a HierarchicalClustering |
Definition at line 38 of file HierarchicalClustering.cpp.
|
virtual |
Default Destructor
Definition at line 48 of file HierarchicalClustering.cpp.
|
virtual |
This function clears the Clusterer module, removing any trained model and setting all the base variables to their default values.
Reimplemented from GRT::Clusterer.
Definition at line 94 of file HierarchicalClustering.cpp.
|
virtual |
This deep copies the variables and models from the Clusterer pointer to this HierarchicalClustering instance. This overrides the base deep copy function for the Clusterer modules.
const | Clusterer *clusterer: a pointer to the Clusterer base class, this should be pointing to another HierarchicalClustering instance |
Reimplemented from GRT::Clusterer.
Definition at line 68 of file HierarchicalClustering.cpp.
|
virtual |
This loads a trained HierarchicalClustering model from a file. This overrides the loadModelFromFile function in the base class.
fstream | &file: a reference to the file the HierarchicalClustering model will be loaded from |
Reimplemented from GRT::MLBase.
Definition at line 418 of file HierarchicalClustering.cpp.
HierarchicalClustering & GRT::HierarchicalClustering::operator= | ( | const HierarchicalClustering & | rhs | ) |
Defines how the data from the rhs instance should be copied to this instance
const | HierarchicalClustering &rhs: another instance of a HierarchicalClustering |
Definition at line 52 of file HierarchicalClustering.cpp.
|
virtual |
This resets the Clusterer. This overrides the reset function in the MLBase base class.
Reimplemented from GRT::Clusterer.
Definition at line 87 of file HierarchicalClustering.cpp.
|
virtual |
This saves the trained HierarchicalClustering model to a file. This overrides the saveModelToFile function in the base class.
fstream | &file: a reference to the file the HierarchicalClustering model will be saved to |
Reimplemented from GRT::MLBase.
Definition at line 389 of file HierarchicalClustering.cpp.
|
virtual |
This is the main training interface for referenced MatrixDouble data. It overrides the train_ function in the ML base class.
MatrixDouble | &trainingData: a reference to the training data that will be used to train the ML model |
Reimplemented from GRT::Clusterer.
Definition at line 146 of file HierarchicalClustering.cpp.
|
virtual |
This is the main training interface for reference ClassificationData data. It overrides the train_ function in the ML base class.
ClassificationData | &trainingData: a reference to the training data that will be used to train the ML model |
Reimplemented from GRT::Clusterer.
Definition at line 106 of file HierarchicalClustering.cpp.
|
virtual |
This is the main training interface for reference UnlabelledData data. It overrides the train_ function in the ML base class.
UnlabelledData | &trainingData: a reference to the training data that will be used to train the ML model |
Reimplemented from GRT::Clusterer.
Definition at line 126 of file HierarchicalClustering.cpp.