Skip to content

Add _OneToOneFeatureMixin to class templates #74

@klapo

Description

@klapo

Scikit-learn recently updated all classes to have the get_feature_names_out method in order to allow retrieving feature names from pipelines (scikit-learn/scikit-learn#21308). The templates could be updated to reflect this new "template".

I believe it is just as simple as add _OneToOneFeatureMixin to each class. e.g.

from sklearn.base import BaseEstimator, ClassifierMixin, TransformerMixin, _OneToOneFeatureMixin

and

class TemplateEstimator(BaseEstimator, _OneToOneFeatureMixin):

What do you think?

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