8000 Update the model_selection module with changes from master · raghavrv/scikit-learn@d427c56 · GitHub
[go: up one dir, main page]

Skip to content

Commit d427c56

Browse files
committed
Update the model_selection module with changes from master
From scikit-learn#5161 - MAINT remove redundant p variable - Add check for sparse prediction in cross_val_predict From scikit-learn#5201 - DOC improve random_state param doc From scikit-learn#5190 - LabelKFold and test From scikit-learn#4583 - LabelShuffleSplit and tests From scikit-learn#5300 - shuffle the `labels` not the `indxs` in LabelKFold + tests Other minor changes ------------------- Fix cross_validation reference Fix the labels param doc
1 parent d4a497e commit d427c56

File tree

7 files changed

+444
-122
lines changed

7 files changed

+444
-122
lines changed

sklearn/model_selection/__init__.py

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
from ._split import BaseCrossValidator
22
from ._split import KFold
3+
from ._split import LabelKFold
34
from ._split import StratifiedKFold
45
from ._split import LeaveOneLabelOut
56
from ._split import LeaveOneOut
67
from ._split import LeavePLabelOut
78
from ._split import LeavePOut
89
from ._split import ShuffleSplit
10+
from ._split import LabelShuffleSplit
911
from ._split import StratifiedShuffleSplit
1012
from ._split import PredefinedSplit
1113
from ._split import train_test_split
@@ -23,10 +25,11 @@
2325
from ._search import ParameterSampler
2426
from ._search import fit_grid_point
2527

26-
__all__ = ('BaseCrossValidator', 'GridSearchCV', 'KFold', 'LeaveOneLabelOut',
27-
'LeaveOneOut', 'LeavePLabelOut', 'LeavePOut', 'ParameterGrid',
28-
'ParameterSampler', 'PredefinedSplit', 'RandomizedSearchCV',
29-
'ShuffleSplit', 'StratifiedKFold', 'StratifiedShuffleSplit',
30-
'check_cv', 'cross_val_predict', 'cross_val_score',
31-
'fit_grid_point', 'learning_curve', 'permutation_test_score',
32-
'train_test_split', 'validation_curve')
28+
__all__ = ('BaseCrossValidator', 'GridSearchCV', 'KFold', 'LabelKFold',
29+
'LeaveOneLabelOut', 'LeaveOneOut', 'LeavePLabelOut', 'LeavePOut',
30+
'ParameterGrid', 'ParameterSampler', 'PredefinedSplit',
31+
'RandomizedSearchCV', 'ShuffleSplit', 'LabelShuffleSplit',
32+
'StratifiedKFold', 'StratifiedShuffleSplit', 'check_cv',
33+
'cross_val_predict', 'cross_val_score', 'fit_grid_point',
34+
'learning_curve', 'permutation_test_score', 'train_test_split',
35+
'validation_curve')

sklearn/model_selection/_search.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -669,7 +669,7 @@ class GridSearchCV(BaseSearchCV):
669669
See the :mod:`sklearn.model_selection` module for the list of
670670
cross-validation strategies that can be used here.
671671
672-
Also refer :ref:`cross-validation documentation <_cross_validation>`
672+
Also refer :ref:`cross-validation documentation <cross_validation>`
673673
674674
refit : boolean, default=True
675675
Refit the best estimator with the entire dataset.
@@ -875,7 +875,7 @@ class RandomizedSearchCV(BaseSearchCV):
875875
See the :mod:`sklearn.model_selection` module for the list of
876876
cross-validation strategies that can be used here.
877877
878-
Also refer :ref:`cross-validation documentation <_cross_validation>`
878+
Also refer :ref:`cross-validation documentation <cross_validation>`
879879
880880
refit : boolean, default=True
881881
Refit the best estimator with the entire dataset.

0 commit comments

Comments
 (0)
0