facebook/prophet

add support for regressors in make_future_dataframe

Open

#2068 aperta il 15 nov 2021

Vedi su GitHub
 (4 commenti) (3 reazioni) (0 assegnatari)Python (4451 fork)batch import
enhancementgood first issue

Metriche repository

Star
 (17.686 star)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

make_future_dataframe doesn't support regressors currently. So code like:

m = Prophet()
m.add_regressor('var')
m.fit(df)
forecasts = m.predict(m.make_future_dataframe(periods=7))

gives an error like:

ValueError: Regressor 'var' missing from dataframe when attempting to generate forecasts

I know prophet may not know what exact values to put for var in each of the rows added but it can create a dataframe with thes(e) column(s) with default values for this.

There is a post on stackoverflow a year ago looking for this: https://stackoverflow.com/questions/64822488/how-to-use-prophets-make-future-dataframe-with-multiple-regressors

Guida contributor