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

Skip to content

TransformedTargetClassifier #20952

Open
@mfeurer

Description

@mfeurer

Describe the workflow you want to enable

I would like to be able to use a LabelEncoder as a wrapper for a classifier, similarly to what can be achieved with preprocessors on the y value for regressors via the TransformedTargetRegressor.

Describe your proposed solution

Add a class TransformedTargetClassifier that accepts both a transformer on y and a classifier.

Describe alternatives you've considered, if relevant

An alternative would be to use the voting classifier with a single estimator, but that appears to be misusing that class.

Additional context

I'm proposing this feature because in Auto-sklearn we use the LabelEncoder on a call to fit to have all classifiers we try use a simple, encoded representation. When using the Auto-sklearn classes we can undo the transformations ourselves. However, if the user would like to access an individual model, there's no way we can wrap the LabelEncoder around this models.

CC @eddiebergman

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Todo

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions