Hello
I found a weird behavior with direct fit AND when dynamic features (X_df) is used
I don't understand why predic give different results for xgbRegressor when I compare the result with one model (XGBoost only) vs 2 models (XGBoost and LGBM)
Here the minimal code I use to reproduce
mlfcst = MLForecast(models=models,freq=freq,date_features=['month','quarter','year'])
mlfcst.fit(df_histo, static_features=[], max_horizon=h)
pred_ml = mlfcst.predict(h, X_df=X_df)
Guillaume GALIE
01/06/2025, 11:44 AM
and to complete my analysis
Recursive mode for both cases gives same result for xgbregressor
Direct mode without dynamic feature give same result xgbregressor
So either I don't understand correctly the behavior of direct mode with dynamic features either it's a bug
j
José Morales
01/06/2025, 3:54 PM
Hey. Which version are you using?
g
Guillaume GALIE
01/06/2025, 4:29 PM
mlforecast 1.0.0
j
José Morales
01/06/2025, 5:19 PM
thanks. there's indeed a bug because the second model in the list gets the wrong features. also only the first timestamp from the features is used and we currently require the full horizon. I'll work on fixing these
👍 1
José Morales
01/06/2025, 6:34 PM
The fix is on the main branch now and will be on the next release