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
Hi, is it possible to add the equivalent of the var.monotone option in R GBM package to the GradientBoostingClassifier/Regressor? Sometimes it is really useful when we know/want some factors to have monotonic effect to avoid overfitting and non-intuitive results.
Could someone possibly label this as a new feature and assign to me? I've already made a start: this notebook demonstrates it working for DecisionTreeRegressor and GradientBoostingRegressor. Code is here. I'd welcome advice on the API (and the code too), here's what I've gone with:
Activity
gravesee commentedon Apr 13, 2016
+1 for this feature. It is what allows me to use GBM for regulated credit risk models
tsterbak commentedon Apr 21, 2016
+1, I would love to use this!
pat-oreilly commentedon Aug 20, 2016
Could someone possibly label this as a new feature and assign to me? I've already made a start: this notebook demonstrates it working for DecisionTreeRegressor and GradientBoostingRegressor. Code is here. I'd welcome advice on the API (and the code too), here's what I've gone with:
Thanks!
amueller commentedon Aug 26, 2016
@PatrickOReilly please create a pull request so we can easily review the changes.
I'm not sure this is within scope, but it might be, depending on the changes. If we decide not to merge, it would still be great to have it in scikit-learn-contrib: https://github.com/scikit-learn-contrib/scikit-learn-contrib/blob/master/README.md
lorentzenchr commentedon Feb 28, 2026
Meanwhile, we have monotonic constraints on all tree based models, see #13649 and #15582, except
GradientBoosting*which will not happen, see #27516.