Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@adrinjalali
Copy link
Member

Fixes #14858.

Raise a warning and switch to binary_crossentropy if it's a binary classification problem and categorical_crossentropy is given.

@NicolasHug
Copy link
Member

Thanks for the PR.

If the user specifies categorical_crossentropy on a binary classif problem, I think we should either:

  1. raise an error
  2. still use categorical_crossentropy but raise a warning "you're building 2 trees instead of 1 so just use 'binary_crossentropy' or even better, use 'auto' ".

I'm in favor of just raising an error (because we have the 'auto' option that just works). But I'm OK with option 2 as well. The current proposal is re-implementing the 'auto' logic but with a warning so I don't think we want that.

Copy link
Member

@NicolasHug NicolasHug left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@adrinjalali
Copy link
Member Author

@ogrisel maybe you could have a look?

@adrinjalali
Copy link
Member Author

ping @ogrisel or @glemaitre should be an easy one :)

Copy link
Member

@glemaitre glemaitre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apart of the comment raised by @thomasjpfan LGTM

@glemaitre
Copy link
Member

I pushed the fix and will merge when it is green

@glemaitre glemaitre merged commit 38af35d into scikit-learn:master Sep 20, 2019
@adrinjalali adrinjalali deleted the hgbt/crossentropy branch September 20, 2019 09:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

HGBC with categorical_crossentropy fails silently on binary classification

4 participants