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.
Main Page
Related Pages
Classes
Files
Examples
File List
File Members
RBMQuantizer.h
Go to the documentation of this file.
1
37
#ifndef GRT_RBM_QUANTIZER_HEADER
38
#define GRT_RBM_QUANTIZER_HEADER
39
40
//Include the main GRT header to get access to the FeatureExtraction base class
41
#include "../../CoreModules/FeatureExtraction.h"
42
#include "../../CoreAlgorithms/BernoulliRBM/BernoulliRBM.h"
43
#include "../../DataStructures/TimeSeriesClassificationData.h"
44
#include "../../DataStructures/ClassificationDataStream.h"
45
#include "../../DataStructures/UnlabelledData.h"
46
47
GRT_BEGIN_NAMESPACE
48
49
class
GRT_API
RBMQuantizer
:
public
FeatureExtraction
{
50
public
:
56
RBMQuantizer
(
const
UINT numClusters=10);
57
63
RBMQuantizer
(
const
RBMQuantizer
&rhs);
64
68
virtual
~
RBMQuantizer
();
69
76
RBMQuantizer
& operator=(
const
RBMQuantizer
&rhs);
77
86
virtual
bool
deepCopyFrom
(
const
FeatureExtraction
*featureExtraction);
87
96
virtual
bool
computeFeatures
(
const
VectorFloat
&inputVector);
97
104
virtual
bool
reset
();
105
111
virtual
bool
clear
();
112
120
virtual
bool
save
( std::fstream &file )
const
;
121
129
virtual
bool
load
( std::fstream &file );
130
137
virtual
bool
train_
(
ClassificationData
&trainingData);
138
145
virtual
bool
train_
(
TimeSeriesClassificationData
&trainingData);
146
153
virtual
bool
train_
(
ClassificationDataStream
&trainingData);
154
161
virtual
bool
train_
(
UnlabelledData
&trainingData);
162
169
virtual
bool
train_
(
MatrixFloat
&trainingData);
170
177
UINT quantize(
const
Float inputValue);
178
185
UINT quantize(
const
VectorFloat
&inputVector);
186
192
bool
getQuantizerTrained()
const
;
193
199
UINT getNumClusters()
const
;
200
206
UINT getQuantizedValue()
const
;
207
213
VectorFloat
getQuantizationDistances()
const
;
214
220
BernoulliRBM
getBernoulliRBM()
const
;
221
227
bool
setNumClusters(
const
UINT numClusters);
228
229
//Tell the compiler we are using the following functions from the MLBase class to stop hidden virtual function warnings
230
using
MLBase::save
;
231
using
MLBase::load
;
232
using
MLBase::train
;
233
using
MLBase::train_
;
234
using
MLBase::predict
;
235
using
MLBase::predict_
;
236
242
static
std::string
getId
();
243
244
protected
:
245
UINT numClusters;
246
BernoulliRBM
rbm;
247
VectorFloat
quantizationDistances;
248
249
private
:
250
static
RegisterFeatureExtractionModule< RBMQuantizer >
registerModule;
251
static
std::string id;
252
};
253
254
GRT_END_NAMESPACE
255
256
#endif //GRT_RBM_QUANTIZER_HEADER
257
GRTBase::getId
std::string getId() const
Definition:
GRTBase.cpp:85
MLBase::predict
virtual bool predict(VectorFloat inputVector)
Definition:
MLBase.cpp:135
MLBase::predict_
virtual bool predict_(VectorFloat &inputVector)
Definition:
MLBase.cpp:137
MLBase::reset
virtual bool reset()
Definition:
MLBase.cpp:147
MatrixFloat
Definition:
MatrixFloat.h:36
ClassificationDataStream
Definition:
ClassificationDataStream.h:42
MLBase::train
virtual bool train(ClassificationData trainingData)
Definition:
MLBase.cpp:107
MLBase::save
virtual bool save(const std::string &filename) const
Definition:
MLBase.cpp:167
UnlabelledData
Definition:
UnlabelledData.h:38
FeatureExtraction::computeFeatures
virtual bool computeFeatures(const VectorFloat &inputVector)
Definition:
FeatureExtraction.h:75
BernoulliRBM
Definition:
BernoulliRBM.h:42
RegisterFeatureExtractionModule< RBMQuantizer >
ClassificationData
Definition:
ClassificationData.h:43
FeatureExtraction
Definition:
FeatureExtraction.h:38
RBMQuantizer
Definition:
RBMQuantizer.h:49
VectorFloat
Definition:
VectorFloat.h:33
MLBase::train_
virtual bool train_(ClassificationData &trainingData)
Definition:
MLBase.cpp:109
TimeSeriesClassificationData
Definition:
TimeSeriesClassificationData.h:42
FeatureExtraction::clear
virtual bool clear() override
Definition:
FeatureExtraction.cpp:106
MLBase::load
virtual bool load(const std::string &filename)
Definition:
MLBase.cpp:190
FeatureExtraction::deepCopyFrom
virtual bool deepCopyFrom(const FeatureExtraction *rhs)
Definition:
FeatureExtraction.h:58
GRT
FeatureExtractionModules
RBMQuantizer
RBMQuantizer.h
Generated on Mon Jan 2 2017 16:24:36 for GestureRecognitionToolkit by
1.8.11