Skip to content

Commit e2e5fbd

Browse files
committed
Merge pull request #5201 from christophebourguignat/master
DOC Clarify random_state parameter in KFold() doc
2 parents 364825a + b10e78e commit e2e5fbd

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
@@ -254,7 +254,7 @@ class KFold(_BaseKFold):
254254
"""K-Folds cross validation iterator.
255255
256256
Provides train/test indices to split data in train test sets. Split
257-
dataset into k consecutive folds (without shuffling).
257+
dataset into k consecutive folds (without shuffling by default).
258258
259259
Each fold is then used a validation set once while the k - 1 remaining
260260
fold form the training set.
@@ -273,8 +273,8 @@ class KFold(_BaseKFold):
273273
Whether to shuffle the data before splitting into batches.
274274
275275
random_state : None, int or RandomState
276-
Pseudo-random number generator state used for random
277-
sampling. If None, use default numpy RNG for shuffling
276+
When shuffle=True, pseudo-random number generator state used for
277+
shuffling. If None, use default numpy RNG for shuffling.
278278
279279
Examples
280280
--------
@@ -363,8 +363,8 @@ class StratifiedKFold(_BaseKFold):
363363
into batches.
364364
365365
random_state : None, int or RandomState
366-
Pseudo-random number generator state used for random
367-
sampling. If None, use default numpy RNG for shuffling
366+
When shuffle=True, pseudo-random number generator state used for
367+
shuffling. If None, use default numpy RNG for shuffling.
368368
369369
Examples
370370
--------

0 commit comments

Comments
 (0)