Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 879d947

Browse filesBrowse files
committed
Add comments for groups in stratified CV tests
1 parent 6fd5ec8 commit 879d947
Copy full SHA for 879d947

File tree

Expand file treeCollapse file tree

1 file changed

+2
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-0
lines changed

‎sklearn/model_selection/tests/test_split.py

Copy file name to clipboardExpand all lines: sklearn/model_selection/tests/test_split.py
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,7 @@ def test_stratified_kfold_ratios(k, shuffle, kfold):
353353
y = np.array([4] * int(0.10 * n_samples) +
354354
[0] * int(0.89 * n_samples) +
355355
[1] * int(0.01 * n_samples))
356+
# ensure perfect stratification with StratifiedGroupKFold
356357
groups = np.arange(len(y))
357358
distr = np.bincount(y) / len(y)
358359

@@ -376,6 +377,7 @@ def test_stratified_kfold_label_invariance(k, shuffle, kfold):
376377
[0] * int(0.89 * n_samples) +
377378
[1] * int(0.01 * n_samples))
378379
X = np.ones(len(y))
380+
# ensure perfect stratification with StratifiedGroupKFold
379381
groups = np.arange(len(y))
380382

381383
def get_splits(y):

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.