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
SOMQuantizer.h
Go to the documentation of this file.
1
37
#ifndef GRT_SOM_QUANTIZER_HEADER
38
#define GRT_SOM_QUANTIZER_HEADER
39
40
//Include the main GRT header to get access to the FeatureExtraction base class
41
#include "../../CoreModules/FeatureExtraction.h"
42
#include "../../ClusteringModules/SelfOrganizingMap/SelfOrganizingMap.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
SOMQuantizer
:
public
FeatureExtraction
{
50
public
:
56
SOMQuantizer
(
const
UINT numClusters=10);
57
63
SOMQuantizer
(
const
SOMQuantizer
&rhs);
64
68
virtual
~
SOMQuantizer
();
69
76
SOMQuantizer
& operator=(
const
SOMQuantizer
&rhs);
77
86
virtual
bool
deepCopyFrom
(
const
FeatureExtraction
*featureExtraction);
87
95
virtual
bool
computeFeatures
(
const
VectorFloat
&inputVector);
96
103
virtual
bool
reset
();
104
110
virtual
bool
clear
();
111
119
virtual
bool
save
( std::fstream &file )
const
;
120
128
virtual
bool
load
( std::fstream &file );
129
136
virtual
bool
train_
(
ClassificationData
&trainingData);
137
144
virtual
bool
train_
(
TimeSeriesClassificationData
&trainingData);
145
152
virtual
bool
train_
(
ClassificationDataStream
&trainingData);
153
160
virtual
bool
train_
(
UnlabelledData
&trainingData);
161
168
virtual
bool
train_
(
MatrixFloat
&trainingData);
169
176
UINT quantize(
const
Float inputValue);
177
184
UINT quantize(
const
VectorFloat
&inputVector);
185
191
bool
getQuantizerTrained()
const
;
192
198
UINT getNumClusters()
const
;
199
205
UINT getQuantizedValue()
const
;
206
212
VectorFloat
getQuantizationDistances()
const
;
213
219
SelfOrganizingMap
getSelfOrganizingMap()
const
;
220
226
bool
setNumClusters(
const
UINT numClusters);
227
228
//Tell the compiler we are using the following functions from the MLBase class to stop hidden virtual function warnings
229
using
MLBase::save
;
230
using
MLBase::load
;
231
using
MLBase::train
;
232
using
MLBase::train_
;
233
using
MLBase::predict
;
234
using
MLBase::predict_
;
235
241
static
std::string
getId
();
242
243
protected
:
244
UINT numClusters;
245
SelfOrganizingMap
som;
246
VectorFloat
quantizationDistances;
247
248
private
:
249
static
RegisterFeatureExtractionModule< SOMQuantizer >
registerModule;
250
static
std::string id;
251
};
252
253
GRT_END_NAMESPACE
254
255
#endif //GRT_SOM_QUANTIZER_HEADER
256
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
RegisterFeatureExtractionModule< SOMQuantizer >
ClassificationData
Definition:
ClassificationData.h:43
FeatureExtraction
Definition:
FeatureExtraction.h:38
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
SOMQuantizer
Definition:
SOMQuantizer.h:49
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
SelfOrganizingMap
Definition:
SelfOrganizingMap.h:201
GRT
FeatureExtractionModules
SOMQuantizer
SOMQuantizer.h
Generated on Mon Jan 2 2017 16:24:36 for GestureRecognitionToolkit by
1.8.11