ENH add from_cv_results in RocCurveDisplay (list of displays) #30370
+196
−0
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
(Multi-display) #30359)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.
Adds
from_cv_results
which returns a list ofRocCurveDisplay
's, one for each fold.I like this implementation. There is one small problem I'll detail in a review comment.
Any other comments?
Plot looks like (should be the same as the other PRs):