Prakash Pandey
07/24/2024, 2:50 PM# train has columns as - [unique_id, ds, feat1, y]
fcst.fit(train,
dropna=True,
static_features=['feat1'],
)
predictions = fcst.predict(h=12, X_df=test[['unique_id', 'ds', 'feat1']])
Error -
```ValueError: The following features were provided throughbut were considered as static during fit: ['feat1'].X_df
Please re-run the fit step using theargument to indicate which features are static. If all your features are dynamic please pass an empty list (static_features=[]).```static_features
José Morales
07/24/2024, 4:12 PMfeat1
changes over time then it isn't a static feature, you should set static_features=[]
as the message suggestsPrakash Pandey
07/24/2024, 4:14 PMunique_id
& ds
, there will be a particular value for feat1
in both train & test data.José Morales
07/24/2024, 4:15 PMX_df
argument to predict, the static features are handled automaticallyPrakash Pandey
07/24/2024, 4:21 PMfcst.fit(train,
dropna=True,
static_features=['promo_flag'],
)we're providing the additional features as static_features. So for the same unique_ids, & for future dates, we need to provide the values for
feat1
as well. Isn't it?José Morales
07/24/2024, 4:31 PMPrakash Pandey
07/24/2024, 4:37 PMfeat1
in the static_features.
But when I'm doing .predict
with h
& X_df
as its input where X_Df
has 3 columns unique_id
, ds
& feat1
then it is giving me predicted values for y
but the output df doesn't contain the feat1
column which it should as per this use case. Any suggestions on this Jose?José Morales
07/24/2024, 4:39 PMPrakash Pandey
07/24/2024, 4:41 PMfeat1
can be something like item_price.
So while forecasting for future dates, I wanted to include that what will be the item_prices for the given unique_id & for each of those future dates for which I'm predicting the y
José Morales
07/24/2024, 4:41 PMPrakash Pandey
07/24/2024, 4:48 PMfeat1
which is being used for forecasting for future dates. Thanks a lot.José Morales
07/24/2024, 4:50 PM