should we make sample_weight part of fit?

Open
#253 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
12/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale

Research direction

This is an open design question, not a change to make yet. Start with the linked scikit-learn StandardScaler docs to see how sample_weight is passed to fit, then survey which scikit-learn transformers accept it, as the issue asks. Done means a maintainer-agreed decision on which feature_engine transformers should take sample_weight, not a patch.

Written by the indexing model from the issue text.

Description

Some sklearn transformers have an extra parameter in fit, the sample_weight, to tackle imbalanced datasets.

Should we make this part of feature_engine?

Example: https://scikit-learn.org/stable/modules/generated/sklearn.preprocessing.StandardScaler.html

Need to think if it is useful for most transformers, or alternatively, for which transformers it makes sense

Also, need to have an idea of how many of sklearn transformers have sample_weight, because for example, the simpleImputer does not seem to have it

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.