scikit-learn / scikit-learn/scikit-learn

Cross-validation without copying

Open
#7,925 6 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Enhancement Large Scale module:model_selection
Dominant language
Python
Stars
67.3k
Forks
27.4k
Avg merge
1d 15h
Merged PRs (30d)
58

Description

At the moment cross-validation requires indexing an array (or sparse matrix or dataframe) in a way that copies the selected subset of the data. If memory is an issue relative to computation (particular for data being processed in parallel), we could consider modes in which:

  • the cross-validation samples are merely weightings over the original dataset (weight=1 where the instance is included in the sample, 0 if excluded), rather than extractions from it.
  • partial_fit is called over contiguous subsets of the data. Apart from only applying to some estimators, this is complicated by the need to specify multiple iterations with partial_fit.

thoughts?

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 reviewing scikit-learn's cross-validation behavior and the estimator partial_fit API, focusing on how samples are currently indexed and copied. Compare the proposed weighting and contiguous-subset approaches, then clarify which estimators and iteration semantics are supported before defining what a completed feature would guarantee.

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.