https://github.com/nixtla logo
#general
Title
# general
c

Christopher Lo

11/18/2022, 4:23 AM
👋 Hello Nixtla team, wondering if you've come across AS197 estimator for SARMA models from this paper: Melard, G. "A fast algorithm for the exact likelihood of autoregressive-moving average." (1984). Thank you for the excellent numba SARMA implementation 🤝, it is definitely a dramatic improvement compared to existing alternatives! However, I found that it's still not fast enough as a benchmark method for less "well-behaved" time series: in particular with high frequency commodities time-series with high (p, q) and seasonal orders. This AS197 estimator, however, seems to solve this issue and the only open-source implementation at the moment is in Gretl I've been studying the performance of
auto_arima
(less numba compile time) and found a massive variance in training times (between 3-60 seconds) across time series as opposed to <5-10 seconds with
auto_ets
. After doing a meta-analysis of the fit-times against the optimal orders, I found that the current implementation is still quite slow at higher orders and with seasonal orders. Nevertheless, while looking through
statsmodels
, I found an issue that suggests using Chandrasekhar recursions (https://github.com/statsmodels/statsmodels/issues/6812) to dramatically speed up ARMA training times (up to >2-4x speed-up for higher orders with conditional SS). I've attached a screenshot from the paper that demonstrates this. Note: AS154 is the current Kalman filter implementation used in
statsforecast
and
fable
.
m

Max (Nixtla)

11/18/2022, 3:37 PM
Hi @Christopher Lo, thanks for posting here. We really enjoyed your talk at the dev days of sktime and felt humbled that you mentioned us :) Just yesterday we were discussing about the mentioned recursion method and we’re intrigued by it. As we understand it, the massive speed gains apply only to certain ARIMAs and came to the conclusion that at the moment we are not sure about the trade off between implementation effort vs those gains. That being said, we are very happy to discuss the issue with you. You opinión is going to be surely very helpful. (Have you played around with it or have some intuitions?) Regarding bigger season lengths we have experienced good results using MSTL (with ARIMA).
c

Christopher Lo

11/18/2022, 3:53 PM
Thanks for the response Max! I've done a small benchmark (~50 time series) comparing Gretl (the C econometrics library)'s auto_arima with AS 197 against statsforecast and found the following: the variance in fit times is much lower (between 1-10 seconds vs 3-60). Once again, it seems that statsforecast's auto_arima if "fast enough" if we know beforehand that the time series is relatively well-behaved (e.g. AR(1)MA(1)) or (as you suggested) applying MSTL decomposition beforehand. That being said, no other implementation in Python compares! To clarify, I found that the longer fit times come from more "complex" seasonal time series, i.e. when the step-wise search has to look at higher orders before early-stopping. So in production, I've lowered the max p, q, P, Q by half.

https://www.youtube.com/watch?v=uyIlAO390v4

😂 2
Also @Max (Nixtla) thanks for watching the talk and looking into the suggestion! Hopefully I've made a convincing case to move towards global models in a vertically scalable setting. Looking forward to seeing how
neuralforecast
develops!
🙌 2
P.S. Your MSTL-ARIMA suggestion(ala https://www.census.gov/data/software/x13as.html) should probably be the standard benchmarking "AR" technique over standard auto_arima....it is just 2-3 factors slower than all other benchmarking models. Do you think a thin wrapper around such a model such as x13as is a good idea?
🚀 1
m

Max (Nixtla)

11/18/2022, 5:47 PM
I really enjoyed reading this thread! About Anodot, I’m curious about what they are doing.
But maybe also somewhat skeptical
Do you think a thin wrapper around such a x13as model is a good idea?
Great idea 🙂
Also, how do you patent an arima?
5 Views