2016-06-21 3 views
0

나는 트위터의 AnomalyDetection 패키지를 사용하여 의심스러운 데이터를 식별하려고했지만 "direction = 'neg'"옵션을 사용할 수 없었습니다. '=은 "방향을 사용할 수있는 방법이 있나요 NEG을Twitter AnomalyDetection 패키지가 부정적인 이상을 식별 할 수 없음

devtools::install_github("twitter/AnomalyDetection") # install twitter's AnomalyDetection 

library(AnomalyDetection) 

library(fpp) # for 'ausair' data 

library(lubridate) 

myTS <- ausair # initialise data 

myPeriod <- "year" # set the period 

ymth <- paste(start(myTS), collapse="/") 

startDate <- as.Date(paste(ymth, "1", sep="/"), format="%Y/%m/%d") # start date 

eymth <- paste(end(myTS), collapse="/") 

endDate <- as.Date(paste(eymth, "1", sep="/"), format="%Y/%m/%d") # end date 

Dates <- seq.Date(startDate, endDate, by=myPeriod) # create the dates 

Dates <- ymd(Dates) # convert to POSIXct 

Dates <- as.POSIXct(Dates) 

myData <- data.frame(Dates, myTS) # cast as a data.frame 

AnomalyDetectionTs(myData, max_anoms = 0.2, direction='pos', plot=TRUE) # this works! 

AnomalyDetectionTs(myData, max_anoms = 0.2, direction='neg', plot=TRUE) # this doesn't 

: 나는 (here에서 가져온) 다음 예제를 실행하면, 난 단지 0 관찰과 data.frame, 그리고 플롯에 대한 NULL 결과를 얻을 수 ''옵션은?

답변

0

간단한 해답은 neg 예외가없는 것일 수 있습니다. 나는 이것이 나의 분석과 함께 일어나는 것을 보았다. max_anoms 매개 변수를 완화하면 모델이 더 민감 해집니다.

관련 문제