Hello, I have a question about mlforecast and I th...
# general
Hello, I have a question about mlforecast and I thought of asking it here in case anyone could help me. I am using mlforecast with the lightgbm regressor and I create a lot of features (dynamic, recursive and date features). I would like to see the feature importances in order to understand which of those features were the most important for the model and restrict my feature set a little bit. Does anyone know how to extract the feature importances from the mlforecast object?
Just need to access the underlying model via the models_ attribute of MLForecast and plot using LightGBM's function:
import lightgbm as lgb
lgb.plot_importance(mlf.models_['LGBMRegressor'], max_num_features=5)
Here mlf is the mlforecast class after fitting and max_num_features is the number of the top features to plot.
👍 1
Cc @José Morales