-
Notifications
You must be signed in to change notification settings - Fork 779
Error in if (data_sigma == 0) break : #58
Comments
Wasn't this test made to protect from constant time series? Here is a sample from my time series which is not constant: 1 2015-06-01 00:00:00 1932 I got the same error as @sarojhange when I called AnomalyDetectionTs() with max_anoms set to 0.1 ans = AnomalyDetectionTs(x = data,
+ max_anoms = 0.1,
+ direction = "both",
+ alpha = 0.05,
+ longterm = F,
+ plot = T )
Error in if (data_sigma == 0) break :
missing value where TRUE/FALSE needed But with max_anoms set to 0.01 the function worked fine, and in the plot I could see a correctly identified single anomaly in the data. ans = AnomalyDetectionTs(x = data,
+ max_anoms = 0.01,
+ direction = "both",
+ alpha = 0.05,
+ longterm = F,
+ plot = T )
ans$anoms
timestamp anoms
1 2015-06-06 16:30:00 29473 |
Also having issues with the interactions on this particular code. Seems to run with max_anoms is <10% but will hard break otherwise. |
Heh, just ran into the same problem, applying the same fix in the process. This definitely needs a better solution. |
I had this issue -- the problem in my case was that my timestamps did not have an assigned time zone. this caused an issue in the lines
of |
Below is the sample: weekly data for a metrics. Want to detect anomalies in this time series. The error I encounter while running the code 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
The text was updated successfully, but these errors were encountered: