10BC0 ENH un-confuse pos_label use for label indicator matrices · Issue #1992 · scikit-learn/scikit-learn · GitHub
[go: up one dir, main page]

Skip to content

ENH un-confuse pos_label use for label indicator matrices #1992

@jnothman

Description

@jnothman

Some metrics take a pos_label argument and interpret it as indicating the positive class in a label indicator matrix (multilabel target representation). This meaning should be removed because it is unusual for pos_label to not be 1, and it can be confused with the positive class label (which corresponds to a column in a label indicator matrix, not a value).

Should pos_label also be removed from LabelBinarizer (where it means "positive indicator value") and fixed to 1? I assume neg_label should not be fixed to 0, as some classifiers work with -1 (however, perhaps that's not a desirable flexibility in label indicator matrices).

I don't particularly like pos_label being used there either, given that label is synonymous with class elsewhere. Perhaps the LabelBinarizer parameters, where not removed, should be renamed to pos_indicator and neg_indicator.

This was brought up at #1983 and #1985 (I accidentally posed it at one when it was meant for the other!).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0