alkaline-ml / pmdarima

A statistical library designed to fill the void in Python's time series analysis capabilities, including the equivalent of R's auto.arima function.
https://www.alkaline-ml.com/pmdarima
MIT License
1.57k stars 231 forks source link

Long Periods of Seasonality (m=112) takes long time in auto_arima #103

Closed RahatKatal closed 5 years ago

RahatKatal commented 5 years ago

Description

Hi All,

I am trying to use auto-arima for a long periods of seasonality. However, it seems that it takes a long time to run. In R, we can give fourier function in xreg to convert long seasonality to non-seasonal.

https://www.rdocumentation.org/packages/forecast/versions/8.5/topics/fourier https://robjhyndman.com/hyndsight/longseasonality/

is there any equivalent in pmdarima?

Any help will be appreciated.

Steps/Code to Reproduce

Here is my statement:

model_fit = auto_arima(user_data.iloc[:, i], error_action='ignore', suppress_warnings=True, m = 112, seasonal= True, D=1, stepwise=True)

tgsmith61591 commented 5 years ago

This is really a duplicate of #102. While there is some work being done for the v1.2.0 release that will dramatically speed up tests of seasonality, the core time waster is actually the internal SARIMAX computation, which is just a slow thing. Can you share R vs Python benchmarks (without Fourier transform) so we can compare apples to apples?

In regards to transforming your data, you could try any of scipy's many Fourier methods. I'd be interested to know whether that speeds things up...

tgsmith61591 commented 5 years ago

... but you raise a good point. Maybe specific Fourier functions could be a good addition to the package.

tgsmith61591 commented 5 years ago

Fourier featurizers were added in #121 and will be released in v1.2.0