Akumuli
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends
anomalydetector.h
1 #pragma once
2 #include <cinttypes>
3 #include <deque>
4 #include <math.h>
5 #include <memory>
6 #include <unordered_map>
7 #include <vector>
8 
9 namespace Akumuli {
10 namespace QP {
11 
14  virtual void add(uint64_t id, double value) = 0;
15  virtual bool is_anomaly_candidate(uint64_t id) const = 0;
16  virtual void move_sliding_window() = 0;
17 };
18 
20 
22  static std::unique_ptr<AnomalyDetectorIface>
23  create_approx_sma(uint32_t N, uint32_t K, double threshold, uint32_t window_size);
24 
26  static std::unique_ptr<AnomalyDetectorIface> create_precise_sma(double threshold,
27  uint32_t window_size);
28 
30  static std::unique_ptr<AnomalyDetectorIface> create_approx_ewma(uint32_t N, uint32_t K,
31  double threshold, double alpha);
32 
34  static std::unique_ptr<AnomalyDetectorIface> create_precise_ewma(double threshold,
35  double alpha);
36 
38  static std::unique_ptr<AnomalyDetectorIface>
39  create_precise_double_exp_smoothing(double threshold, double alpha, double beta);
40 
42  static std::unique_ptr<AnomalyDetectorIface>
43  create_approx_double_exp_smoothing(uint32_t N, uint32_t K, double threshold, double alpha,
44  double beta);
45 
46  static std::unique_ptr<AnomalyDetectorIface>
47  create_precise_holt_winters(double threshold, double alpha, double beta, double gamma,
48  int period);
49 
50  static std::unique_ptr<AnomalyDetectorIface>
51  create_approx_holt_winters(uint32_t N, uint32_t K, double threshold, double alpha, double beta,
52  double gamma, int period);
53 };
54 }
55 }
Definition: anomalydetector.h:19
static std::unique_ptr< AnomalyDetectorIface > create_precise_sma(double threshold, uint32_t window_size)
Create precise anomaly detector based on simple moving-average smothing.
Definition: anomalydetector.cpp:622
static std::unique_ptr< AnomalyDetectorIface > create_approx_ewma(uint32_t N, uint32_t K, double threshold, double alpha)
Create approximate anomaly detector based on EWMA smoothing.
Definition: anomalydetector.cpp:635
static std::unique_ptr< AnomalyDetectorIface > create_precise_ewma(double threshold, double alpha)
Create precise anomaly detector based on EWMA smoothing.
Definition: anomalydetector.cpp:650
static std::unique_ptr< AnomalyDetectorIface > create_approx_holt_winters(uint32_t N, uint32_t K, double threshold, double alpha, double beta, double gamma, int period)
Create precise anomaly detector based on simple moving-average smothing or EWMA.
Definition: anomalydetector.cpp:711
static std::unique_ptr< AnomalyDetectorIface > create_precise_holt_winters(double threshold, double alpha, double beta, double gamma, int period)
Create precise anomaly detector based on simple moving-average smothing or EWMA.
Definition: anomalydetector.cpp:694
Definition: anomalydetector.h:13
static std::unique_ptr< AnomalyDetectorIface > create_approx_sma(uint32_t N, uint32_t K, double threshold, uint32_t window_size)
Create approximate anomaly detector based on simple moving-average smothing.
Definition: anomalydetector.cpp:607
static std::unique_ptr< AnomalyDetectorIface > create_precise_double_exp_smoothing(double threshold, double alpha, double beta)
Create precise anomaly detector based on double Holt-Winters smoothing.
Definition: anomalydetector.cpp:663
static std::unique_ptr< AnomalyDetectorIface > create_approx_double_exp_smoothing(uint32_t N, uint32_t K, double threshold, double alpha, double beta)
Create approximate anomaly detector based on double Holt-Winters smoothing.
Definition: anomalydetector.cpp:677