Skip to content

Commit 48bb4f3

Browse files
committed
DOC update cross validation docstrings for default indices=True
1 parent 87a28cd commit 48bb4f3

File tree

1 file changed

+28
-28
lines changed

1 file changed

+28
-28
lines changed

sklearn/cross_validation.py

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@ class LeaveOneOut(object):
3535
n: int
3636
Total number of elements
3737
38-
indices: boolean, optional (default False)
39-
Return train/test split with integer indices or boolean mask.
40-
Integer indices are useful when dealing with sparse matrices
41-
that cannot be indexed by boolean masks.
38+
indices: boolean, optional (default True)
39+
Return train/test split as arrays of indices, rather than a boolean
40+
mask array. Integer indices are required when dealing with sparse
41+
matrices, since those cannot be indexed by boolean masks.
4242
4343
Examples
4444
========
@@ -112,10 +112,10 @@ class LeavePOut(object):
112112
p: int
113113
Size of the test sets
114114
115-
indices: boolean, optional (default False)
116-
Return train/test split with integer indices or boolean mask.
117-
Integer indices are useful when dealing with sparse matrices
118-
that cannot be indexed by boolean masks.
115+
indices: boolean, optional (default True)
116+
Return train/test split as arrays of indices, rather than a boolean
117+
mask array. Integer indices are required when dealing with sparse
118+
matrices, since those cannot be indexed by boolean masks.
119119
120120
Examples
121121
========
@@ -188,10 +188,10 @@ class KFold(object):
188188
k: int
189189
Number of folds
190190
191-
indices: boolean, optional (default False)
192-
Return train/test split with integer indices or boolean mask.
193-
Integer indices are useful when dealing with sparse matrices
194-
that cannot be indexed by boolean masks.
191+
indices: boolean, optional (default True)
192+
Return train/test split as arrays of indices, rather than a boolean
193+
mask array. Integer indices are required when dealing with sparse
194+
matrices, since those cannot be indexed by boolean masks.
195195
196196
Examples
197197
--------
@@ -278,10 +278,10 @@ class StratifiedKFold(object):
278278
k: int
279279
Number of folds
280280
281-
indices: boolean, optional (default False)
282-
Return train/test split with integer indices or boolean mask.
283-
Integer indices are useful when dealing with sparse matrices
284-
that cannot be indexed by boolean masks.
281+
indices: boolean, optional (default True)
282+
Return train/test split as arrays of indices, rather than a boolean
283+
mask array. Integer indices are required when dealing with sparse
284+
matrices, since those cannot be indexed by boolean masks.
285285
286286
Examples
287287
--------
@@ -366,10 +366,10 @@ class LeaveOneLabelOut(object):
366366
Arbitrary domain-specific stratification of the data to be used
367367
to draw the splits.
368368
369-
indices: boolean, optional (default False)
370-
Return train/test split with integer indices or boolean mask.
371-
Integer indices are useful when dealing with sparse matrices
372-
that cannot be indexed by boolean masks.
369+
indices: boolean, optional (default True)
370+
Return train/test split as arrays of indices, rather than a boolean
371+
mask array. Integer indices are required when dealing with sparse
372+
matrices, since those cannot be indexed by boolean masks.
373373
374374
Examples
375375
----------
@@ -451,10 +451,10 @@ class LeavePLabelOut(object):
451451
p : int
452452
Number of samples to leave out in the test split.
453453
454-
indices: boolean, optional (default False)
455-
Return train/test split with integer indices or boolean mask.
456-
Integer indices are useful when dealing with sparse matrices
457-
that cannot be indexed by boolean masks.
454+
indices: boolean, optional (default True)
455+
Return train/test split as arrays of indices, rather than a boolean
456+
mask array. Integer indices are required when dealing with sparse
457+
matrices, since those cannot be indexed by boolean masks.
458458
459459
Examples
460460
----------
@@ -669,10 +669,10 @@ class ShuffleSplit(object):
669669
Should be between 0.0 and 1.0 and represent the proportion of
670670
the dataset to include in the test split.
671671
672-
indices : boolean, optional (default False)
673-
Return train/test split with integer indices or boolean mask.
674-
Integer indices are useful when dealing with sparse matrices
675-
that cannot be indexed by boolean masks.
672+
indices : boolean, optional (default True)
673+
Return train/test split as arrays of indices, rather than a boolean
674+
mask array. Integer indices are required when dealing with sparse
675+
matrices, since those cannot be indexed by boolean masks.
676676
677677
random_state : int or RandomState
678678
Pseudo-random number generator state used for random sampling.

0 commit comments

Comments
 (0)