Github Link Of Luminol Library: https://github.com/linkedin/luminol
Can someone explain to me a sample code on how to use this module to detect anomalies in a dataset.
I want to use this module to detect anomalies in time series data.
PS: I tried example 1 specified in README.md, but received an error, so please provide me with a working example for detecting anomalies.
Example 1 Put anomaly ratings on the list.
from luminol.anomaly_detector import AnomalyDetector my_detector = AnomalyDetector(ts) score = my_detector.get_all_scores() anom_score = list() for (timestamp, value) in score.iteritems(): t_str = time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(timestamp)) anom_score.append([t_str, value])
Error getting value: (22, "Invalid argument") On line: t_str = time.strftime ('% Y-% m-% d% H:% M% S', time.localtime (timestamp))
Using Python 2.7
Thanks:)
source share