Add a Binarizer class

Open
#790 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale

Research direction

The issue asks for a Binarizer transformer in feature_engine that works inside a Pipeline without a ColumnTransformer. The reporter mentions a BaseDiscretizer subclass they wrote, and the sklearn Binarizer is the reference behaviour. Before starting, ask a maintainer whether they want this, since the issue has no reply in 820 days. Done means a transformer that binarizes selected variables, keeps column names, and has tests.

Written by the indexing model from the issue text.

Description

A clear and concise description of what the problem is.
I needed to binarize some features in a pipeline but saw that this wasn't currently implemented in the package; I instead used the sklearn Binarizer and ColumnTransformer classes. This wasn't ideal as I had to keep track of the new indexes at subsequent steps of the pipeline - one of the nice things about feature engine is that you don't have to worry about that.

Describe the solution you'd like
An implementation of a Binarizer class that bypasses the need for the corresponding sklearn class and that you can use directly within the Pipeline class instead of using ColumnTransformer.

Describe alternatives you've considered
I wrote a class that inherits from the BaseDiscretizer which works as described above.

Would it be OK for me to work on this and open a PR?

Dominant language
Python
Stars
2.3k
Forks
391
Avg merge
11h 34m
Merged PRs (30d)
11

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from feature-engine/feature_engine

All issues in feature-engine/feature_engine

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.