Repository navigation
MNT Remove deprecated parameters in Displays for 1.10 - #35276
Conversation
| def from_predictions( | ||
| cls, | ||
| y_true, | ||
| y_score=None, |
There was a problem hiding this comment.
None was only needed when y_pred could be passed instead during the deprecation period, now it is required.
cakedev0
left a comment
There was a problem hiding this comment.
LGTM, thanks! Just one optional nit on the dev doc.
About the follow-ups you listed:
estimator_name -> name in CalibrationDisplay: +1, it's the last curve display with estimator_name. Once it's done we can also drop the getattr(self, "estimator_name", ...) fallback in _validate_plot_params and the # TODO: Clean-up once estimator_name deprecated in all displays branches in the common tests. Let's do it in a separate PR.
For the other ones, I'm not sure.
Co-authored-by: Arthur Lacote <[email protected]>
betatim
left a comment
There was a problem hiding this comment.
LGTM.
I applied Arthur's fix and pushed a commit that fixes the ax.figure.
I think the other follow up items are best done in a new PR or in an issue to discuss what we should do
|
Not sure how we count approvals on this PR, but I used the power vested in me by the scikit-learn project to hit merge :D |
Reference Issues/PRs
Towards #35252
What does this implement/fix? Explain your changes.
Removes the deprecated parameters and the corresponding tests for
estimator_name(nowname) fromPrecisionRecallDisplayy_pred(nowy_score) fromPrecisionRecallDisplayandDetCurveDisplayAI usage disclosure
I used AI assistance for:
Any other comments?
I also included some cosmetic replacements (in the RocCurve example where it was deprecated in the last release, and to avoid confusion also in some places where it is only used as a variable name).
Some potential follow-ups that I didn't address here:
y_predas return variable name, even though the docstring already describes it as "Target scores". It has been renamed asy_scorein some curves and displays already, and in sklearn/metrics/_ranking.py,y_predis specifically reserved for "thresholded predictions, internally computed asy_pred = (y_score >= threshold)".For consistency, should it also be renamed to
y_scorein sklearn/utils/_response.py?estimator_namein favor ofnamealso in CalibrationDisplay.(The predictions are called
y_probthere, I'm not sure if we'd also want to make it consistent withy_scoreas well.)