-
-
Notifications
You must be signed in to change notification settings - Fork 25.9k
Add sampling uncertainty on precision-recall and ROC curves #26192
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
base: main
Are you sure you want to change the base?
Add sampling uncertainty on precision-recall and ROC curves #26192
Conversation
Hi, Here is a first version on the PR, adding this feature on precision-recall only, once we agree on the integration for this one, I will add the ROC in an analogous way, in this PR. I will add unit tests and more function docstrings in sklearn/metrics/_plot/uncertainty.py soon. |
""" | ||
TODO: Documentation | ||
|
||
AISTAT 2023 `Sampling uncertainties on the Precision-Recall curve` |
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.
Correct title of paper is: Pointwise sampling uncertainties on the Precision-Recall curve
with authors: R.E.Q. Urlus, M.A. Baak, S. Collot, I. Fridman Rojas
@stephanecollot This implementation does not match the implementation in MMU and is not as described in the paper. This code creates a grid of a fixed shape for each P,R point and evaluates the chi2 score. The reference implementation creates a P, R grid with a set number of points per axis. |
That is correct, I tried 3 different methods for the grid, fix number grid point per point (the current one), the paper one and an adaptative grid (i.e. "x point per cm²"). They had different pros and cons, and I picked the best in terms for plotting smoothness and execution time. But it is true that I'm not taking the minimum chi2, which can make the plot look different. |
I‘m not sure, but maybe https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.random_table.html#scipy.stats.random_table could be of help. |
Reference Issues/PRs
Closes #25856
What does this implement/fix? Explain your changes.
Add sampling uncertainty on precision-recall and ROC curves.
See more details in the Issue above.