twitter / AnomalyDetection

Anomaly Detection with R
GNU General Public License v3.0
3.55k stars 776 forks source link

using anomalydetection for a time series data package but there is an error i am getting #57

Open sarojhange opened 9 years ago

sarojhange commented 9 years ago

PFB the dataset: weekly data for a metrics. Want to detect anomalies in this time series. The error I get is : Error in if (data_sigma == 0) break : missing value where TRUE/FALSE needed 1 2013-01-01 59.94 2 2013-01-08 59.65 3 2013-01-15 61.56 4 2013-01-22 58.37 5 2013-01-29 58.07 6 2013-02-05 57.31 7 2013-02-12 58.53 8 2013-02-19 63.22 9 2013-02-26 60.21 10 2013-03-05 59.09 11 2013-03-12 57.19 12 2013-03-19 55.97 13 2013-03-26 59.96

brightbird commented 9 years ago

I got the same errors too. Have you solved the problem yet? @sarojhange

The error is

anomous_points<-AnomalyDetectionTs(table1,max_anoms=0.1,

The structure of my data:

str(table1) 'data.frame': 169921 obs. of 2 variables: $ time : POSIXlt, format: ... $ traffic.out: num 8.78e+08 8.87e+08 8.77e+08 8.67e+08 8.57e+08 ...

The head six raws of my data: head(table1) time traffic.out 1 2015-04-01 00:00:00 878347968 2 2015-04-01 00:01:00 887359296 3 2015-04-01 00:02:00 877318720 4 2015-04-01 00:03:00 867278144 5 2015-04-01 00:04:00 857237568 6 2015-04-01 00:05:00 847196992

I looked into the function detect_anoms(),in line 89,there's comment about variable 'data_sigma': '# protect against constant time series',