You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
HistGradientBoosting should shuffle features when exploring for new splits #26428
Our implementation of HistGradientBoosting does not shuffle the feature at each node to find the best split. Note that our GradientBoosting, RandomForest, and DecisionTree use a Fisher-Yates permutation.
Not permuting features introduces a bias that can have some impact. For instance, it will impact the inspection and could lead to misinterpretation if one does not know about this implementation detail.
Below, I show an example where correlated features will have close importance in the case of a GradientBoosting. For HistGradientBoosting, a single feature (in an arbitrary manner) will be used and thus only a single feature is reported as important.
As discussed IRL with @glemaitre, there might be a similar issue with Lasso(selection="cyclic") vs Lasso(selection="random") and selection="cyclic" is the default.
I‘m not 100% convinced that this needs to be fixed. The model does nothing wrong and even the inspection shows nothing wrong.
A predictive model is not primarily meant for (statistical) inference. So drawing the conclusion that some feature has no impact/correlation to the target based on feature importance of an ML model is just wrong.
I am going to close this one. As I said, neither strategy (shuffling or not) is better. It depends on the use case. If I want to detect features that I can drop, the HistGradientBoosting* estimators do a much better job.
On top, meanwhile we have feature subsampling for HGBT since #27139. By modifying the above code with the addition of max_features=0.5, I get:
Activity
ogrisel commentedon May 25, 2023
As discussed IRL with @glemaitre, there might be a similar issue with
Lasso(selection="cyclic")vsLasso(selection="random")andselection="cyclic"is the default.lorentzenchr commentedon Nov 15, 2023
I‘m not 100% convinced that this needs to be fixed. The model does nothing wrong and even the inspection shows nothing wrong.
A predictive model is not primarily meant for (statistical) inference. So drawing the conclusion that some feature has no impact/correlation to the target based on feature importance of an ML model is just wrong.
JadeAffolabi commentedon Oct 19, 2025
Hello,
If this issue is still open, can I work on it ?
lorentzenchr commentedon Dec 30, 2025
I am going to close this one. As I said, neither strategy (shuffling or not) is better. It depends on the use case. If I want to detect features that I can drop, the HistGradientBoosting* estimators do a much better job.
On top, meanwhile we have feature subsampling for HGBT since #27139. By modifying the above code with the addition of
max_features=0.5, I get: