Sam media anomaly detector library
Project description
Time series forecasting and anomaly detection library on top of fbprophet
.. code:: python
import pandas as pd
from psycopg2 import connect
from sam_anomaly_detector import Forecaster
df_data = pd.read_csv('dataset.csv', columns=['ds', 'y'])
json_data = df_data.to_json(orient='records')
anomalies = Detector().forecast_today(dataset=json_data)
print(anomalies)
- Input data should be a panda DataFrame having time and aggregated data
- Passed columns to forecaster should be 'ds' for 'time' and 'y' for 'aggregated data'
- Output is a panda DataFrame of anomalies. Important columns are:
- actual: today's actual value
- yhat_lower: forecast lower boundary
- yhat: : forecastted value
- yhat_upper: forecast upper boundary
- std: standard diviation from boundaries. negative value means how far it is from 'yhat_lower',
positive value means how far it is from 'yhat_upper'
.. code:: python
import pandas as pd
from psycopg2 import connect
from sam_anomaly_detector import Forecaster
df_data = pd.read_csv('dataset.csv', columns=['ds', 'y'])
json_data = df_data.to_json(orient='records')
anomalies = Detector().forecast_today(dataset=json_data)
print(anomalies)
- Input data should be a panda DataFrame having time and aggregated data
- Passed columns to forecaster should be 'ds' for 'time' and 'y' for 'aggregated data'
- Output is a panda DataFrame of anomalies. Important columns are:
- actual: today's actual value
- yhat_lower: forecast lower boundary
- yhat: : forecastted value
- yhat_upper: forecast upper boundary
- std: standard diviation from boundaries. negative value means how far it is from 'yhat_lower',
positive value means how far it is from 'yhat_upper'
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for sam_anomaly_detector-1.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7fca3ee18c7106980e787d565319f9f9ff89d5d03d040724ff81041069643cb7 |
|
MD5 | 03f1b2f2cdb5390ebc434ebea82b0465 |
|
BLAKE2b-256 | d3befecf5396396be29eca5602660c7477c4e2f6ebe9fe0a2a3f2146bbe7bff7 |