8000 [MRG+1] Fix #9743: Adding parameter information to docstring. (#9757) · scikit-learn/scikit-learn@ed5511c · GitHub
[go: up one dir, main page]

Skip to content

Commit ed5511c

Browse files
taylorkmamueller
authored andcommitted
[MRG+1] Fix #9743: Adding parameter information to docstring. (#9757)
* Adding parameter information to docstring. * Removing trailing whitespace from lines. * Adding details of parameter to formal Parameters section. * Shortened lines to meet requirements.
1 parent 4620829 commit ed5511c

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

sklearn/model_selection/_split.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1715,12 +1715,19 @@ def _validate_shuffle_split(n_samples, test_size, train_size):
17151715
class PredefinedSplit(BaseCrossValidator):
17161716
"""Predefined split cross-validator
17171717
1718-
Splits the data into training/test set folds according to a predefined
1719-
scheme. Each sample can be assigned to at most one test set fold, as
1720-
specified by the user through the ``test_fold`` parameter.
1718+
Provides train/test indices to split data into train/test sets using a
1719+
predefined scheme specified by the user with the ``test_fold`` parameter.
17211720
17221721
Read more in the :ref:`User Guide <cross_validation>`.
17231722
1723+
Parameters
1724+
----------
1725+
test_fold : array-like, shape (n_samples,)
1726+
The entry ``test_fold[i]`` represents the index of the test set that
1727+
sample ``i`` belongs to. It is possible to exclude sample ``i`` from
1728+
any test set (i.e. include sample ``i`` in every training set) by
1729+
setting ``test_fold[i]`` equal to -1.
1730+
17241731
Examples
17251732
--------
17261733
>>> from sklearn.model_selection import PredefinedSplit

0 commit comments

Comments
 (0)
0