scikit-learn / scikit-learn/scikit-learn
TransformedTargetClassifier
@gtauzin is already working on this.
Since Sep 28, 2024.
- Dominant language
- Python
- Stars
- 67.3k
- Forks
- 27.4k
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 58
Description
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.