scikit-learn / scikit-learn/scikit-learn

Weights for sklearn.model_selection.KFold

Open
#21,719 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

module:model_selection New Feature
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

Kfold with weights. For example stratified kfold is with equal weights for all classes.

Describe your proposed solution

Please let me know if there is such feature already available. If not, I will describe in detail.

Describe alternatives you've considered, if relevant

Stratiied kfold can hve this as an argument

Additional context

I need this to unequally weigh the classes in imbalanced task and generate dataset for another stage of process

Contributor guide

Open the contributing guide

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.

Research direction

Start by reading the sklearn.model_selection.KFold entry point and its documentation, then compare it with stratified k-fold behavior. Determine whether weighted classes or weighted fold assignment is already supported, and clarify the expected weighting semantics before proposing implementation work.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.