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

Skip to content

Output shape of VotingClassifier.transform is non-standardΒ #7230

Closed
@amueller

Description

@amueller

The output shape of VotingClassifier.transform is (n_classifiers, n_samples, n_classes), which is quite strange for sklearn and prevents it's use in pipelines (without extra work going through function transformer).
That kind of defeats the purpose of the transform imho.

At least n_samples should always be the first dimension, I think.
We could add a "flatten_transform" parameter or something so that transform returns (n_samples, n_classifiers * n_classes) so it can be used in a pipeline, without changing the current interface. Not sure if there is a good way to change the current default shape without major hassle.

Metadata

Metadata

Assignees

No one assigned

    Labels

    EnhancementModerateAnything that requires some knowledge of conventions and best practicesSprint

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions