![]() |
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.
|
Classes | |
struct | BatchIndexs |
Public Member Functions | |
BernoulliRBM (const UINT numHiddenUnits=100, const UINT maxNumEpochs=1000, const double learningRate=1, const double learningRateUpdate=1, const double momentum=0.5, const bool useScaling=true, const bool randomiseTrainingOrder=true) | |
bool | predict_ (VectorDouble &inputData) |
bool | predict_ (VectorDouble &inputData, VectorDouble &outputData) |
bool | predict_ (const MatrixDouble &inputData, MatrixDouble &outputData, const UINT rowIndex) |
virtual bool | train_ (MatrixDouble &data) |
virtual bool | reset () |
virtual bool | clear () |
virtual bool | saveModelToFile (fstream &file) const |
virtual bool | loadModelFromFile (fstream &file) |
bool | reconstruct (const VectorDouble &input, VectorDouble &output) |
virtual bool | print () const |
bool | getRandomizeWeightsForTraining () const |
UINT | getNumVisibleUnits () const |
UINT | getNumHiddenUnits () const |
VectorDouble | getOutputData () const |
const MatrixDouble & | getWeights () const |
bool | setNumHiddenUnits (const UINT numHiddenUnits) |
bool | setMomentum (const double momentum) |
bool | setLearningRateUpdate (const double learningRateUpdate) |
bool | setRandomizeWeightsForTraining (const bool randomizeWeightsForTraining) |
bool | setBatchSize (const UINT batchSize) |
bool | setBatchStepSize (const UINT batchStepSize) |
![]() | |
MLBase (void) | |
virtual | ~MLBase (void) |
bool | copyMLBaseVariables (const MLBase *mlBase) |
virtual bool | train (ClassificationData trainingData) |
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_ (UnlabelledData &trainingData) |
virtual bool | train (MatrixDouble data) |
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 | 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 Types | |
typedef struct BatchIndexs | BatchIndexs |
Protected Member Functions | |
bool | loadLegacyModelFromFile (fstream &file) |
<Tell the compiler we are using the base class predict method to stop hidden virtual function warnings | |
double | sigmoid (const double &x) |
double | sigmoidRandom (const double &x) |
![]() | |
bool | saveBaseSettingsToFile (fstream &file) const |
bool | loadBaseSettingsFromFile (fstream &file) |
![]() | |
double | SQR (const double &x) const |
Protected Attributes | |
bool | randomizeWeightsForTraining |
UINT | numVisibleUnits |
UINT | numHiddenUnits |
UINT | batchSize |
UINT | batchStepSize |
double | momentum |
double | learningRateUpdate |
MatrixDouble | weightsMatrix |
VectorDouble | visibleLayerBias |
VectorDouble | hiddenLayerBias |
VectorDouble | ph_mean |
VectorDouble | ph_sample |
VectorDouble | nv_means |
VectorDouble | nv_samples |
VectorDouble | nh_means |
VectorDouble | nh_samples |
VectorDouble | outputData |
vector< MinMax > | ranges |
Random | rand |
![]() | |
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 | |
![]() | |
enum | BaseTypes { BASE_TYPE_NOT_SET =0, CLASSIFIER, REGRESSIFIER, CLUSTERER } |
![]() | |
static string | getGRTVersion (bool returnRevision=true) |
static string | getGRTRevison () |
Definition at line 41 of file BernoulliRBM.h.
|
virtual |
This function will completely clear the RBM instance, removing any trained model and setting all the base variables to their default values.
Reimplemented from GRT::MLBase.
Definition at line 402 of file BernoulliRBM.cpp.
|
virtual |
This loads a trained model from a file.
fstream | &file: a reference to the file the model will be loaded from |
Reimplemented from GRT::MLBase.
Definition at line 484 of file BernoulliRBM.cpp.
|
virtual |
This is the prediction interface for referenced VectorDouble data, it calls the main prediction interface below. The RBM should be trained first before you use this function. The size of the input data must match the number of visible units.
VectorDouble | &inputData: a reference to the input data that will be used to train the RBM model |
Reimplemented from GRT::MLBase.
Definition at line 32 of file BernoulliRBM.cpp.
bool GRT::BernoulliRBM::predict_ | ( | VectorDouble & | inputData, |
VectorDouble & | outputData | ||
) |
This is the main prediction interface for referenced VectorDouble data. It propagates the input data up through the RBM. The RBM should be trained first before you use this function. The size of the input data must match the number of visible units.
VectorDouble | &inputData: a reference to the input data that will be used to train the RBM model |
VectorDouble | &outputData: a reference to the output data that will be used to train the RBM model |
Definition at line 41 of file BernoulliRBM.cpp.
bool GRT::BernoulliRBM::predict_ | ( | const MatrixDouble & | inputData, |
MatrixDouble & | outputData, | ||
const UINT | rowIndex | ||
) |
This function is used during the training phase to propagate the input data up through the RBM, this gives P( h_j = 1 | input ) If you are using this function then you should make sure the RBM is trained first before you use it. The size of the matrices must match the size of the model.
const | MatrixDouble &inputData: a reference to the input data |
MatrixDouble | &outputData: a reference to the output data that will store the results of the propagation |
const | UINT rowIndex: the row in the inputData/outputData that should be used for the propagation |
Definition at line 77 of file BernoulliRBM.cpp.
|
virtual |
This is the main print interface for all the GRT machine learning algorithms. This should be overwritten by the derived class. It will print the model and settings to the display log.
Reimplemented from GRT::MLBase.
Definition at line 632 of file BernoulliRBM.cpp.
|
virtual |
This function will reset the model (i.e. set all values back to default settings). If you want to completely clear the model (i.e. clear any learned weights or values) then you should use the clear function.
Reimplemented from GRT::MLBase.
Definition at line 394 of file BernoulliRBM.cpp.
|
virtual |
This saves the trained model to a file.
fstream | &file: a reference to the file the model will be saved to |
Reimplemented from GRT::MLBase.
Definition at line 425 of file BernoulliRBM.cpp.
|
virtual |
This is the main training interface for referenced MatrixDouble data.
MatrixDouble | &trainingData: a reference to the training data that will be used to train the RBM model |
Reimplemented from GRT::MLBase.
Definition at line 111 of file BernoulliRBM.cpp.