Skip to content

add optional 'classes' argument to .fit methods #8004

Closed
@kmike

Description

@kmike

partial_fit methods support classes argument which allows to set classes explicitly, without inferring them from data. What do you think about supporting it in .fit as well?

If data is split into multiple parts (e.g. for cross-validation), then one of the parts may miss examples of some of the classes, and in this case classifier fit on this part will produce predict_proba results of a different dimension than classifiers fit on other parts. If multiple parts miss examples of different classes then it could also happen that predict_proba results have the same number of columns, but columns correspond to different classes. It won't be a problem if classes can be passed explicitly, like in partial_fit.

My use case: using mean KL divergence as a metric for a multiclass probabilistic classifier.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions