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

Lewis Livingston

07/25/2023, 8:08 PM
Hi, I am a demand planner seeking to improve our sales forecasting process. Today we use basic Excel-based models, but I'm interested in your statistical package for generating forecasts. I'm truly impressed with the range of tools your team has developed and would love to leverage them in my work and share them with my team. I wanted to inquire about the possibility of allowing my users to input and control certain parameters within StatsForecast. For example, I'm interested in enabling users to define P, D, and Q for your ARIMA deployment. After carefully reviewing the arguments for the StatsForecast.fit, StatsForecast.predict, and StatsForecast.forecast methods, I couldn't find any indication of this functionality. Is there a way to enable parameter customization for ARIMA or any other forecast models in StatsForecast? Your insights would be greatly appreciated. Thank you,
m

Max (Nixtla)

07/25/2023, 8:23 PM
Thanks a lot! You can do that using the order parameter of the Arima model. https://nixtla.github.io/statsforecast/src/core/models.html#arima-family
# ARIMA Model
arima = ARIMA(order=(1, 1, 1), season_length=1)
Then
arima = arima.fit(y=df["y"].values)
and
y_hat_dict = arima.predict(h=6)
l

Lewis Livingston

07/25/2023, 8:37 PM
Fantastic! Thank you! Is there a similar argument for the other available models such as holt winters? I see an "Alpha" argument for exponential smoothing but I don't see a Beta argument for Holt's method.
m

Max (Nixtla)

07/25/2023, 9:26 PM
@Mariana Menchero?
m

Mariana Menchero

07/25/2023, 9:42 PM
Hi @Lewis Livingston there's no beta argument because this implementation of Holt's method is the corresponding best ETS model with either additive or multiplicative errors. Hence, the class only takes the following arguments:
Holt (season_length:int=1, error_type:str='A', alias:str='Holt')
same for Holt-Winters