8000 Simplify scaling of X dataframe · scikit-learn/scikit-learn@9585d68 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9585d68

Browse files
committed
Simplify scaling of X dataframe
1 parent 0721f6b commit 9585d68

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

sklearn/ensemble/tests/test_stacking.py

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@
5353
n_classes=3, random_state=42
5454
)
5555
X_binary, y_binary = make_classification(n_classes=2, random_state=42)
56+
X_breast_cancer, y_breast_cancer = load_breast_cancer(return_X_y=True)
57+
X_breast_cancer = scale(X_breast_cancer)
5658

5759

5860
@pytest.mark.parametrize(
@@ -434,10 +436,8 @@ def test_stacking_classifier_stratify_default():
434436
final_estimator=LogisticRegression(),
435437
cv=KFold(shuffle=True, random_state=42),
436438
),
437-
*[
438-
scale(data) if idx == 0 else data
439-
for idx, data in list(enumerate(load_breast_cancer(return_X_y=True)))
440-
],
439+
X_breast_cancer,
440+
y_breast_cancer,
441441
),
442442
(
443443
StackingRegressor(
@@ -500,10 +500,8 @@ def test_stacking_classifier_sample_weight_fit_param():
500500
],
501501
final_estimator=LogisticRegression(),
502502
),
503-
*[
504-
scale(data) if idx == 0 else data
505-
for idx, data in list(enumerate(load_breast_cancer(return_X_y=True)))
506-
],
503+
X_breast_cancer,
504+
y_breast_cancer,
507505
),
508506
(
509507
StackingRegressor(

0 commit comments

Comments
 (0)
0