Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

auto.arima not parallelizing

Tags:

r

forecasting

I'm attempting to speed up a slow auto.arima function by running it on a computer with 4 dual-core CPUs (I'm using Ubuntu 13.04 and R 2.15.2). The function is fitting a time series with 350,000 data points and roughly 50 exogenous variables. I'm using the below code

fit<-auto.arima(orders,xreg=exogen, stepwise=FALSE, parallel=TRUE, num.cores=4)

However, I have multiple CPUs (each with multiple cores), not just one CPU with multiple cores. In case R was smart enough to get around this cores/CPUs differentiation, I took a look at my resource monitor and saw this:

enter image description here

which shows that only CPU3 is maxed out.

Any thoughts on how to resolve? Does the forecast package work with DoSNOW?

like image 503
Bryan Avatar asked Aug 13 '13 22:08

Bryan


People also ask

Does auto ARIMA do differencing?

Auto. arima has the ability to decide whether or not the data used to train the model needs a seasonal differencing.

When should Arima models not be used?

💾 ARIMA requires a long historical horizon, especially for seasonal products. Using three years of historical demand is likely not to be enough. Short Life-Cycle Products. Products with a short life-cycle won't benefit from this much data.

How can auto Arima models be improved?

1- Check again the stationarity of the time series using augmented Dickey-Fuller (ADF) test. 2- Try to increase the number of predictors ( independent variables). 3- Try to increase the sample size (in case of monthly data, to use at least 4 years data.


1 Answers

Try num.cores=8 and num.cores=7, use system.time() to see which one runs faster. If I remember correctly, R treats 1 core as one CPU. You have 8 cores, if I understood you correctly: "4 dual-core CPUs".

like image 186
power Avatar answered Oct 09 '22 06:10

power