[R] R Timeseries tsoutliers:tso

Darshan Pandya d@r@h@np@ndy@ @ending from gm@il@com
Thu Apr 12 23:26:33 CEST 2018


Hello,

Writing to seek help in regard to some unexpected performance anomaly i am
observing in using tsoutlers:tso on the mac vs on an AWS cloud server..


I am running the following code with very small dataset of about 208
records.

d.dir <- '/Users/darshanpandya/xxxxxx'
FNAME <- 'my_data.csv'

d.input <- fread(file.path(paste0(d.dir,"/zzz/"),FNAME,fsep =
.Platform$file.sep), header = TRUE, stringsAsFactors = FALSE, showProgress
= TRUE) %>% as.data.frame
d.input$dummy_date <- as.Date(d.input$dummy_date, "%Y-%m-%d")

selectedCols <- c("observation","dummy_date")
inputData <- d.input[,selectedCols]
outlier.types <- list("Additive Outliers","Levels Shifts","Seasonal Level
Shifts","Innovation Outlier","Temporary Change")
tsFrequency <- 52
params <- list("outlier.types" = outlier.types,"tsFrequency" = tsFrequency)

tsFrequency = params$tsFrequency
outTypes <- unlist(params$outlier.types)
ts.var <- ts(inputData[,1], frequency = tsFrequency)
ts_outlier <- tso(ts.var, types =
​outlier.types ​
, maxit = 1)

​

This piece of code runs in about 60 seconds on my laptop but take about
upward of 13 mins on a decent AWS node with nothing else running on it.

Any hints as to why this is happening is greatly appreciated.
Thank you for your help.
​

-- 
Sincerely,
Darshan

	[[alternative HTML version deleted]]




More information about the R-help mailing list