Skip to content

var.monotone option in GradientBoosting #6656

Closed

Description

@jingsliu07

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.

Thanks!

Activity

  1. gravesee commented on Apr 13, 2016

    @gravesee

    +1 for this feature. It is what allows me to use GBM for regulated credit risk models

  2. tsterbak commented on Apr 21, 2016

    @tsterbak

    +1, I would love to use this!

  3. pat-oreilly commented on Aug 20, 2016

    @pat-oreilly
    Contributor

    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:

    #Columns 0 and 4 monotonically increasing, column 2 monotonically decreasing
    GradientBoostingRegressor(..., increasing=[0,4], decreasing=[2])
    

    Thanks!

  4. amueller commented on Aug 26, 2016

    @amueller
    Member

    @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

  5. lorentzenchr commented on Feb 28, 2026

    @lorentzenchr
    Member

    Meanwhile, we have monotonic constraints on all tree based models, see #13649 and #15582, except GradientBoosting* which will not happen, see #27516.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions