Skip to content

[RFC] Stateless transformers requiring fit? #12616

@amueller

Description

@amueller

Right now there's some estimators that don't require calling "fit", two that I'm aware of: Normalizer and FunctionTransformer. They do input validation if fit is called.
There's one estimator that is stateless but requires calling fit for no real reason I can see, AdditiveChi2Sampler.

My questions are:

  • Should we remove the requirement to calling fit if it can be avoided?

  • If fit is called, should we ensure that the number of features is the same in fit and transform, even though that's not required by the algorithm to avoid user errors?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions