ENH add from_cv_results
in RocCurveDisplay
(Multi-display)
#30359
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_results
inRocCurveDisplay
(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_validate
to optionally return the predictions as well (note this would makecross_val_predict
redundant).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...Display
class 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_results
instead)Any other comments?
Plot looks like:
