Skip to content

Commit ce2d74c

Browse files
DOC TimeSeriesSplit training set size formula precision (scikit-learn#28322)
Co-authored-by: Jérémie du Boisberranger <jeremie@probabl.ai>
1 parent 09b37b4 commit ce2d74c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

sklearn/model_selection/_split.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1178,7 +1178,9 @@ class TimeSeriesSplit(_BaseKFold):
11781178
The training set has size ``i * n_samples // (n_splits + 1)
11791179
+ n_samples % (n_splits + 1)`` in the ``i`` th split,
11801180
with a test set of size ``n_samples//(n_splits + 1)`` by default,
1181-
where ``n_samples`` is the number of samples.
1181+
where ``n_samples`` is the number of samples. Note that this
1182+
formula is only valid when ``test_size`` and ``max_train_size`` are
1183+
left to their default values.
11821184
"""
11831185

11841186
def __init__(self, n_splits=5, *, max_train_size=None, test_size=None, gap=0):

0 commit comments

Comments
 (0)