31 #ifndef GRT_MOVEMENT_DETECTOR_HEADER 32 #define GRT_MOVEMENT_DETECTOR_HEADER 34 #include "../../CoreModules/MLBase.h" 40 MovementDetector(
const UINT numDimensions = 1,
const Float upperThreshold = 1,
const Float lowerThreshold = 0.9,
const Float gamma = 0.95,
const UINT searchTimeout = 0);
69 virtual bool save( std::fstream &file )
const;
78 virtual bool load( std::fstream &file );
80 Float getUpperThreshold()
const;
82 Float getLowerThreshold()
const;
84 Float getMovementIndex()
const;
86 Float getGamma()
const;
88 bool getMovementDetected()
const;
90 bool getNoMovementDetect()
const;
92 UINT getState()
const;
94 UINT getSearchTimeout()
const;
96 bool setUpperThreshold(
const Float upperThreshold);
98 bool setLowerThreshold(
const Float lowerThreshold);
100 bool setGamma(
const Float gamma);
102 bool setSearchTimeout(
const UINT searchTimeout);
105 using MLBase::saveModelToFile;
106 using MLBase::loadModelFromFile;
112 Float upperThreshold;
113 Float lowerThreshold;
117 bool movementDetected;
118 bool noMovementDetected;
123 enum SearchStates{SEARCHING_FOR_MOVEMENT=0,SEARCHING_FOR_NO_MOVEMENT,SEARCH_TIMEOUT};
129 #endif //GRT_MOVEMENT_DETECTOR_HEADER
virtual bool predict_(VectorFloat &inputVector)
virtual bool save(const std::string &filename) const
virtual bool load(const std::string &filename)
This is the main base class that all GRT machine learning algorithms should inherit from...