Thanks to visit codestin.com
Credit goes to github.com

Skip to content

MNT Make binary display method parameters' order consistent #30717

Closed
@lucyleeow

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions