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

Darius Marginean

03/23/2023, 5:39 PM
Hello all! I've got a question: is it possible to add future regressors to an AutoARIMAProphet model? Do I need to add them in the arima model? Or do I just need to change the disable_seasonal_features from
True
to
False
?
cc @Max (Nixtla) @fede (nixtla) (they/them)
f

fede (nixtla) (they/them)

03/29/2023, 6:28 PM
hey @Darius Marginean! Yes, that’s possible. You have to “register” the external regressor as in prophet
Copy code
model = AutoARIMAProphet()
# "register" the external regressor
model.add_regressor('my_external_regressor')

# train df should have the external regressor
train_df = Y_df[['ds', 'y', 'my_external_regressor']]

# train the model
model.fit(train_df)

# create future dataframe
future_df = model.make_future_dataframe(7, freq='M')

# future_df only contains the ds column, you have to add 
# the external regressor
future_df['my_external_regressor'] = ...

model.predict(future_df)
❤️ 1