Hi team, are there any parameters or tips to speed...
# statsforecast
v
Hi team, are there any parameters or tips to speedup AutoARIMA or AutoETS?
m
Hi @Vítor Barbosa The Auto models are designed to search for the "best" model for each series (here "best" means the model with the lowest AIC) If you have information about your series, for example if you know none have a trend, you could limit the AutoETS search to models without a trend. So limiting the parameter search could help speed up the models, but you need to be careful because you might miss the "best" model when doing so.
v
Thanks for the reply! But is there any option like parallel jobs for the different models?
m
Ah, yes, sorry! You can use
n_jobs=-1
when instantiating the StatsForecast class. This allows the model to use all available CPU cores for parallel processing. Here's an example.
👍 1
v
Ok then, I will try that!
r
Hi there! Talking about cores. I'm using the example pasted below, and I'm noticing on my system monitor that only one core is used each time, even though I'm setting
n_jobs=-1
. Any insights? (version 1.7.5)
Copy code
import random
import pandas as pd
from statsforecast import StatsForecast
from statsforecast.models import AutoARIMA

random.seed(1)
points = 500
test_data = pd.DataFrame({
    "ds": pd.date_range(start="2024-06-01", periods=points, freq="W"),
    "unique_id": "test",
    "y": random.choices(range(0, 100), k=points)
})
model = StatsForecast(
    models=[AutoARIMA(season_length=52)],
    freq="W",
    n_jobs=-1,
)
test_data = test_data[["unique_id", "ds", "y"]]

model.fit(df=test_data)

results = model.predict(h=6)

results