Timeseries VAR vs VARMA model: issue in time to fit model

I want to use VARMA model on a data of about 80000 samples with 10 features. I tried using VARMA model from statsmodels with p=50 and q=10 but it is taking too much time to build the model. I tested the model was running even after 12 hours. Then I tested VARMA using p=50 and q=0, this also was running even after an hour with maxiter=1. The code I am using is:

from statsmodels.tsa.statespace.varmax import VARMAX
modelVARMA = VARMAX(dff, order=(50,0))
resultsVARMA=modelVARMA.fit(maxiter=1)

I also tested VAR model with p=50 and it gave the model quickly. Is there any way to run VARMA model fast as it is in case of VAR.

Topic statsmodels time-series python

Category Data Science


It's because 80,000 samples is probably too much training data. Usually, statistical forecasting models are not trained on the entire training set like ML models. Try reducing your training data significantly, and incorporate only a certain number of seasons as your training data.

Example: If your data is hourly, one season can be 24 samples. Then, the training data can span 14 seasons - 24*14 samples.

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.