We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 707b6f9 commit 716819bCopy full SHA for 716819b
sklearn/model_selection/tests/test_validation.py
@@ -717,13 +717,15 @@ def test_learning_curve_with_boolean_indices():
717
718
719
def test_learning_curve_with_shuffle():
720
- """Following test case was designed this way to verify the code
721
- changes made in pull request: #7506."""
+ # Following test case was designed this way to verify the code
+ # changes made in pull request: #7506.
722
X = np.array([[1, 2], [3, 4], [5, 6], [7, 8], [11, 12], [13, 14], [15, 16],
723
[17, 18], [19, 20], [7, 8], [9, 10], [11, 12], [13, 14],
724
[15, 16], [17, 18]])
725
y = np.array([1, 1, 1, 2, 3, 4, 1, 1, 2, 3, 4, 1, 2, 3, 4])
726
groups = np.array([1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 4, 4, 4, 4])
727
+ # Splits on these groups fail without shuffle as the first iteration
728
+ # of the learning curve doesn't contain label 4 in the training set.
729
estimator = PassiveAggressiveClassifier(shuffle=False)
730
731
cv = GroupKFold(n_splits=2)
0 commit comments