소스 검색

Better anomaly detection

Andrew Kane 8 년 전
부모
커밋
16f258c50f
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      lib/blazer/detect_anomalies.R

+ 2 - 2
lib/blazer/detect_anomalies.R

@@ -8,9 +8,9 @@ tryCatch({
   data$timestamp <- as.POSIXct(data$timestamp)
 
   if (identical(args[1], "ts")) {
-    res = AnomalyDetectionTs(data, direction = "both", alpha = 0.05)
+    res <- AnomalyDetectionTs(data, direction = "both", alpha = 0.05, max_anoms = 0.2)
   } else {
-    res = AnomalyDetectionVec(data$count, direction = "both", alpha = 0.05, period = length(data$count) / 2 - 1)
+    res <- AnomalyDetectionVec(data$count, direction = "both", alpha = 0.05, max_anoms = 0.2, period = length(data$count) / 2 - 1)
   }
 
   write.csv(res$anoms)