Skip to content

Commit

Permalink
DOC Remove random_state note from TimeSeriesSplit, and add where need…
Browse files Browse the repository at this point in the history
  • Loading branch information
will7142 authored and jnothman committed Feb 28, 2018
1 parent df3f7b3 commit f96ee8d
Showing 1 changed file with 14 additions and 18 deletions.
32 changes: 14 additions & 18 deletions sklearn/model_selection/_split.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,6 @@ def split(self, X, y=None, groups=None):
test : ndarray
The testing set indices for that split.
Notes
-----
Randomized CV splitters may return different results for each call of
split. You can make the results identical by setting ``random_state``
to an integer.
"""
X, y, groups = indexable(X, y, groups)
indices = np.arange(_num_samples(X))
Expand Down Expand Up @@ -314,12 +308,6 @@ def split(self, X, y=None, groups=None):
test : ndarray
The testing set indices for that split.
Notes
-----
Randomized CV splitters may return different results for each call of
split. You can make the results identical by setting ``random_state``
to an integer.
"""
X, y, groups = indexable(X, y, groups)
n_samples = _num_samples(X)
Expand Down Expand Up @@ -402,6 +390,10 @@ class KFold(_BaseKFold):
``n_samples // n_splits + 1``, other folds have size
``n_samples // n_splits``, where ``n_samples`` is the number of samples.
Randomized CV splitters may return different results for each call of
split. You can make the results identical by setting ``random_state``
to an integer.
See also
--------
StratifiedKFold
Expand Down Expand Up @@ -749,12 +741,6 @@ def split(self, X, y=None, groups=None):
test : ndarray
The testing set indices for that split.
Notes
-----
Randomized CV splitters may return different results for each call of
split. You can make the results identical by setting ``random_state``
to an integer.
"""
X, y, groups = indexable(X, y, groups)
n_samples = _num_samples(X)
Expand Down Expand Up @@ -1102,6 +1088,11 @@ class RepeatedKFold(_RepeatedSplits):
TRAIN: [1 2] TEST: [0 3]
TRAIN: [0 3] TEST: [1 2]
Notes
-----
Randomized CV splitters may return different results for each call of
split. You can make the results identical by setting ``random_state``
to an integer.
See also
--------
Expand Down Expand Up @@ -1149,6 +1140,11 @@ class RepeatedStratifiedKFold(_RepeatedSplits):
TRAIN: [1 3] TEST: [0 2]
TRAIN: [0 2] TEST: [1 3]
Notes
-----
Randomized CV splitters may return different results for each call of
split. You can make the results identical by setting ``random_state``
to an integer.
See also
--------
Expand Down

0 comments on commit f96ee8d

Please sign in to comment.