Skip to content

MNT Make binary display method parameters' order consistent #30717

Closed

Description

@lucyleeow

This came up while working on #30399 . These are all classes inheriting the _BinaryClassifierCurveDisplayMixin.

  • RocCurveDisplay and PrecisionRecallDisplay are pretty consistent, we would just need to change where pos_label is. No strong preference to where it should be.
  • DetCurveDisplay does not have the chance level line, drop_intermediate and depsine. Chance line is added in ENH/FIX add drop_intermediate to DET curve and add threshold at infinity #29151 (we should ensure order is consistent in that PR). Note there is discussion of adding drop_intermediate in that PR as well
  • CalibrationDisplay - is a bit different from the rest, e.g., there is a reference line (perfect calibration) and not a chance line. We could move ax up though, to be consistent with the other displays.
Table of parameters
CalibrationDisplay DetCurveDisplay RocCurveDisplay PrecisionRecallDisplay
plot ax
name
ref_line
kwargs
ax
name
kwargs
ax
name
plot_chance_level
chance_level_kw
despine
kwargs
ax
name
plot_chance_level
chance_level_kw
despine
kwargs
from_estimator estimator
X
y
n_bins
strategy
pos_label
name
ref_line
ax
kwargs
estimator
X
y
sample_weight
response_method
pos_label
name
ax
kwargs
estimator
X
y
sample_weight
drop_intermediate
response_method
pos_label
name
ax
plot_chance_level
chance_level_kw
despine
kwargs
estimator
X
y
sample_weight
pos_label
drop_intermediate
response_method
name
ax
plot_chance_level
chance_level_kw
despine
kwargs
from_predictions y_true
y_prob
n_bins
strategy
pos_label
name
ref_line
ax
kwargs
y_true
y_pred
sample_weight
pos_label
name
ax
kwargs
y_true
y_pred
sample_weight
drop_intermediate
pos_label
name
ax
plot_chance_level
chance_level_kw
despine
kwargs
y_true
y_pred
sample_weight
pos_label
drop_intermediate
name
ax
plot_chance_level
chance_level_kw
despine
kwargs

Discussed with @DeaMariaLeon @glemaitre

Activity

  1. added
    Needs Triage
    on Jan 25, 2025
  2. DeaMariaLeon commented on Jan 25, 2025

    @DeaMariaLeon
    Member

    /take

  3. added and removed
    Needs Triage
    on Feb 4, 2025
  4. added
    good first issue
    on Jun 16, 2025
  5. lucyleeow commented on Jun 18, 2025

    @lucyleeow
    MemberAuthor

    I think this can be closed now that #29151 is merged (and parameters were added in the correct order)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

good first issuemodule:model_selection

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions