Initially it was mentioned that there is no feature selection, but don’t Ridge Regression and Random Forest inherently perform some form of it?
o
Olivier
03/03/2025, 1:56 PM
"it was mentioned that there is no feature selection" -> what was mentioned where and in which context? Please provide a specific quote or link so that I can understand what this relates to.
One could argue that every model that ingests features does a form of feature selection, sure.
b
Bersu T
03/03/2025, 1:58 PM
I have provided a screenshot. Would you recommend doing an additional feature selection?
o
Olivier
03/03/2025, 2:22 PM
You could look at feature importances of these models afterwards yourself and decide on which features to keep. If you insist on doing feature selection automatically, you could try out something like this Features Elimination - Probatus, but that doesn't integrate nicely with MLForecast I think. Or, as José said, define a custom objective for hyperparam optimization that also includes the feature selection in it.
✅ 1
b
Bersu T
03/04/2025, 1:00 PM
Thanks! AutoMLForecast and MLForecast do not have a feature importance attribute, how kan I look into this?
Hi, when trying to do X = df_encoded.drop(columns=["y", "ds", "unique_id"])
# Extract best LightGBM model
best_model = auto_mlf.models_['lgb']
# Use TreeExplainer for LightGBM
explainer = shap.Explainer(best_model.predict, X)
# Compute SHAP values with NumPy input
shap_values = explainer(X) I get TypeError: 'DataFrame' object cannot be interpreted as an integer. Any idea on how to resolve this?
Bersu T
03/06/2025, 4:45 PM
Is there another way to look into feature importances given by the models?