Skip to content

Commit b10e78e

Browse files
Christophe BourguignatChristophe Bourguignat
authored andcommitted
[DOC] Precision on random_state in KFold() doc
Without paying attention, we could think KFold(30, random_state=123) and KFold(30, random_state=124) generated two different versions
1 parent 53c3530 commit b10e78e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

sklearn/cross_validation.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ class KFold(_BaseKFold):
253253
"""K-Folds cross validation iterator.
254254
255255
Provides train/test indices to split data in train test sets. Split
256-
dataset into k consecutive folds (without shuffling).
256+
dataset into k consecutive folds (without shuffling by default).
257257
258258
Each fold is then used a validation set once while the k - 1 remaining
259259
fold form the training set.
@@ -272,8 +272,8 @@ class KFold(_BaseKFold):
272272
Whether to shuffle the data before splitting into batches.
273273
274274
random_state : None, int or RandomState
275-
Pseudo-random number generator state used for random
276-
sampling. If None, use default numpy RNG for shuffling
275+
When shuffle=True, pseudo-random number generator state used for
276+
shuffling. If None, use default numpy RNG for shuffling.
277277
278278
Examples
279279
--------
@@ -362,8 +362,8 @@ class StratifiedKFold(_BaseKFold):
362362
into batches.
363363
364364
random_state : None, int or RandomState
365-
Pseudo-random number generator state used for random
366-
sampling. If None, use default numpy RNG for shuffling
365+
When shuffle=True, pseudo-random number generator state used for
366+
shuffling. If None, use default numpy RNG for shuffling.
367367
368368
Examples
369369
--------

0 commit comments

Comments
 (0)