Slackbot
09/06/2023, 10:31 PMJosé Morales
09/06/2023, 10:42 PMfrom functools import partial
def select_features(df, features):
return df[features]
features_model1 = partial(select_features, features=['x1, 'x2'])
features_model2 = partial(select_features, features=['x2', 'x3'])
predictions = []
for model, callback in zip([model1, model2], [features_model1, features_model2]):
model_preds = fcst.ts.predict({'model': model}, before_predict_callback=callback)
predictions.append(model_preds)
Evan Miller
09/06/2023, 11:04 PM