New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FEA Add positive and negative likelihood ratios to metrics #22518
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here is a first pass with various comments.
…rn into likelihood_ratios
Co-authored-by: Julien Jerphanion <git@jjerphan.xyz>
The example shows how the decision boundary is kept constant across different prevalences. I thought the illustration was required as this is indeed not the most intuitive user case.
Good idea, it's done :) |
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. One minor suggestion
…nto likelihood_ratios
Co-authored-by: Gael Varoquaux <gael.varoquaux@normalesup.org>
…rn into likelihood_ratios
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
It seems that you still have a conflict :( |
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
…nto likelihood_ratios
…rn into likelihood_ratios
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @ArturoAmorQ LGTM. Merging.
Thanks @jjerphan, @GaelVaroquaux, @glemaitre and @ogrisel for your time and the fruitful discussions we had online and on real life. It was really fun to implement this feature! |
A great addition, and great docs to push users to think about what they
do.
|
…arn#22518) Co-authored-by: Julien Jerphanion <git@jjerphan.xyz> Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org> Co-authored-by: Gael Varoquaux <gael.varoquaux@normalesup.org> Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
…arn#22518) Co-authored-by: Julien Jerphanion <git@jjerphan.xyz> Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org> Co-authored-by: Gael Varoquaux <gael.varoquaux@normalesup.org> Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
Reference Issues/PRs
Fixes #22404.
What does this implement/fix? Explain your changes.
We agreed that we should add positive and negative likelihood ratios as they are considered as standard good practice in medicine / public health, as well as interpretable in terms of the pre-test versus post-test odds ratio even in class imbalance.
Any other comments?
This is a first PR that creates a broad function that computes both positive and negative likelihood ratios. A second step of creating functions that specifically select one or the other ("positive_likelihood_ratio" and a "negative_likelihood_ratio") will be addressed in another PR once that we agreed on forms and variable names for this one.