12345678910111213141516171819202122232425262728293031323334353637 |
- #ifndef MLANALYZER_H
- #define MLANALYZER_H
- #include <chrono>
- #include <vector>
- #include <eigen3/Eigen/Dense>
- #include "DataModel.h"
- #include "MLAlert.h"
-
- //Interface for Machine Learning algorithms
- class MLAnalyzer
- {
- protected:
- std::chrono::milliseconds updateTime;
-
- const long long n;
- long long m;
- unsigned short currentBatch = 0;
- const unsigned short trainAfterNPoints = 10;
-
- //Data references
- CappedStorage* data;
-
- const int updateRate;
- int updateCounter = 0;
-
- public:
-
- MLAnalyzer(CappedStorage *storage);
-
- void addData(Eigen::VectorXd Px, double Py);
- void addData(Eigen::MatrixXd Px, Eigen::VectorXd Py);
-
- virtual MLAlert updateModel() = 0;
- };
-
-
- #endif // MLANALYZER_H
|