ENH add from_cv_results in RocCurveDisplay (Multi-display)#30359
Closed
lucyleeow wants to merge 3 commits intoscikit-learn:mainfrom
Closed
ENH add from_cv_results in RocCurveDisplay (Multi-display)#30359lucyleeow wants to merge 3 commits intoscikit-learn:mainfrom
from_cv_results in RocCurveDisplay (Multi-display)#30359lucyleeow wants to merge 3 commits intoscikit-learn:mainfrom
Conversation
lucyleeow
commented
Nov 28, 2024
| zip(cv_results["estimator"], cv_results["indices"]["test"], fold_name_) | ||
| ): | ||
| y_true = _safe_indexing(y, test_indices) | ||
| y_pred = _get_response_values_binary( |
Member
Author
There was a problem hiding this comment.
I could have used _validate_and_get_response_values instead here. I decided against because it does other checking that we don't need here but 🤷
This was referenced Nov 29, 2024
Member
Author
|
closing in favour of #30399 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reference Issues/PRs
Supercedes #25939
This is part of a group of draft PRs to determine best API for adding plots for cv results to our displays.
from_cv_resultsinRocCurveDisplay(singleRocCurveDisplay) #30399)For all 3 options we take the output of
cross_validate, and use the fitted estimator and test indicies. No fitting is done in the display.We do recalculate the predictions (which would have already been done in
cross_validate), which could be avoided if we decided to changecross_validateto optionally return the predictions as well (note this would makecross_val_predictredundant).See more thread: #25939 (comment)). I think should be outside of the scope of this body of work though.
What does this implement/fix? Explain your changes.
Essentially updates #25939 to main and removes the average and variation parts.
With this approach we have to create a new
Multi...Displayclass for each display. These could be useful to users who want to plot curves that don't come cv but if they are plotting from cv we discourage them to use this class directly (and usefrom_cv_resultsinstead)Any other comments?
Plot looks like:
