Marcnuth / AnomalyDetection

Twitter's Anomaly Detection in Pure Python
Apache License 2.0
306 stars 76 forks source link

Plot Function Addition + Bug Fixes #33

Closed aliasgherman closed 4 years ago

aliasgherman commented 4 years ago
  1. A plot function has been added. the function only takes the data and the anomaly return dict to generate a simple plot and return to user in the dict.

  2. When using pandas dataframes as data, and dtype was int64, it was generating error in the block where dtype is checked against int and float. So I added a check against 'int64' as well

  3. For the cases where the datetime have gaps in the middle, the code would take data which sometimes will be less than the num_obs_samples due to break and will generate assertions. I have handled it by ignoring the samples wherever this condition is not met. This is a debatable approach, however, this does remove the assertion errors as other anomalies are still detected.