Skip to content

Explain how predict_proba is computed from (Hist)GradientBoostingClassifier #29163

Open

Description

@baggiponte

Describe the issue linked to the documentation

I think users would find it useful to see how class probabilities are computed for gradient boosting classifiers 😊 Tried to look into the source but could not understand it. Would be up to taking care of this, but I'd need a reference. Thank you!

Suggest a potential alternative/fix

No response

Activity

  1. adrinjalali commented on Jun 3, 2024

    @adrinjalali
    Member

    @lorentzenchr can probably give a better intuition here.

  2. removed
    Needs Triage
    on Jun 3, 2024
  3. lorentzenchr commented on Jun 3, 2024

    @lorentzenchr
    Member

    See user guide:

    • For binary classification: $\mathrm{expit}(\sum_i tree_i(X))$ and $i=1...$ number of trees/iterations
    • For multiclass class $k$: $\mathrm{softmax}(trees(X)) = \frac{\exp(\sum_i tree_i^k(X))}{\sum_c \exp(\sum_i tree_i^c(X))}$.
  4. baggiponte commented on Jun 3, 2024

    @baggiponte
    ContributorAuthor

    Will use the refs and open a PR later (hopefully today). Will tag @lorentzenchr too for review 😊

  5. rprkh commented on Jul 28, 2024

    @rprkh
    Contributor

    Hi @baggiponte,
    Do you mind if I take up this issue? I have a local commit ready with the changes and I'd be happy to make a PR for this.

  6. baggiponte commented on Jul 29, 2024

    @baggiponte
    ContributorAuthor

    Hi @baggiponte, Do you mind if I take up this issue? I have a local commit ready with the changes and I'd be happy to make a PR for this.

    Ciao, please do! Sorry for taking so much time, but it's been a tough month.

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