41 #ifndef GRT_ZERO_CROSSING_COUNTER_HEADER
42 #define GRT_ZERO_CROSSING_COUNTER_HEADER
44 #include "../../CoreModules/FeatureExtraction.h"
45 #include "../../PreProcessingModules/Derivative.h"
46 #include "../../PreProcessingModules/DeadZone.h"
110 virtual bool reset();
165 VectorDouble
update(
double x);
173 VectorDouble
update(
const VectorDouble &x);
258 enum ZeroCrossingFeatureIDs{NUM_ZERO_CROSSINGS_COUNTED=0,ZERO_CROSSING_MAGNITUDE,TOTAL_NUM_ZERO_CROSSING_FEATURES};
259 enum FeatureModes{INDEPENDANT_FEATURE_MODE=0,COMBINED_FEATURE_MODE};
264 #endif //GRT_ZERO_CROSSING_COUNTER_HEADER
virtual bool saveModelToFile(string filename) const
VectorDouble update(double x)
virtual bool computeFeatures(const VectorDouble &inputVector)
virtual bool loadModelFromFile(string filename)
virtual bool train(ClassificationData trainingData)
virtual ~ZeroCrossingCounter()
double deadZoneThreshold
The threshold value used for the dead zone filter.
CircularBuffer< VectorDouble > dataBuffer
A buffer used to store the previous derivative data.
bool setSearchWindowSize(UINT searchWindowSize)
virtual bool predict(VectorDouble inputVector)
virtual bool predict_(VectorDouble &inputVector)
bool setFeatureMode(UINT featureMode)
virtual bool deepCopyFrom(const FeatureExtraction *featureExtraction)
UINT getSearchWindowSize()
bool setDeadZoneThreshold(UINT deadZoneThreshold)
DeadZone deadZone
Used to remove small amounts of noise from the data.
ZeroCrossingCounter & operator=(const ZeroCrossingCounter &rhs)
ZeroCrossingCounter(UINT searchWindowSize=20, double deadZoneThreshold=0.01, UINT numDimensions=1, UINT featureMode=INDEPENDANT_FEATURE_MODE)
Derivative derivative
Used to compute the derivative of the input signal.
CircularBuffer< VectorDouble > getDataBuffer()
UINT featureMode
The featureMode controls how the features are added to the feature vector.
double getDeadZoneThreshold()
UINT searchWindowSize
The size of the search window, i.e. the amount of previous data stored and searched.
virtual bool train_(ClassificationData &trainingData)