skip to navigation
skip to content

sam-anomaly-detector 1.0

Sam media anomaly detector library

Latest Version: 1.3

This repository is responsible for forecasting today's data based on given historical data

.. 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 = 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'


 
File Type Py Version Uploaded on Size
sam_anomaly_detector-1.0-py3-none-any.whl (md5) Python Wheel py3 2018-02-14 5KB
sam_anomaly_detector-1.0.tar.gz (md5) Source 2018-02-14 7KB