Sam media anomaly detector library
Project description
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'
.. 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'
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sam_anomaly_detector-1.0.tar.gz.
File metadata
- Download URL: sam_anomaly_detector-1.0.tar.gz
- Upload date:
- Size: 7.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eceea581420c40d71b9ac0b25fa6ee8dff8589de825d3ddd3cf027ce6acf00dd
|
|
| MD5 |
b55e38ff08aba8e77145333dddc1e310
|
|
| BLAKE2b-256 |
99a888ee0dd89ebb407f1c822d40bb17ae27846a659dca3c6fe6a921c943dd19
|
File details
Details for the file sam_anomaly_detector-1.0-py3-none-any.whl.
File metadata
- Download URL: sam_anomaly_detector-1.0-py3-none-any.whl
- Upload date:
- Size: 5.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9d02b0a2f54f6103f3b686c042887aa8a988805dc9e84612d452cc5548a6c65e
|
|
| MD5 |
3ba4bf8a639faa01ee882cd3a9a308ad
|
|
| BLAKE2b-256 |
5d012c1ac0753333a0472d3c9dfbcc4e4d56ce2d6d52da36e1642345c7a0ed2a
|