scikit-learn/scikit-learn — pull request #2463 by ogrisel (2013-09-20 20:37:49+00:00)
Title: [MRG] FIX #2372: non-shuffling StratifiedKFold implementation

This is a refactoring of @dnouri's fix for issue #2372 in PR #2450. The goal is to make `StratifiedKFold` cross-validation which is used by default for classification problem, not underestimate overfitting too much on datasets that have a strong samples dependencies.

Indeed the current implementation of `StratifiedKFold` in master shuffles the data before computing the splits which hide the potential non-respect of the IID assumption by the dataset. This is highlighted in the tests on the digits dataset that as strong dependency between samples (co-authorship of consecutive samples).