Skip to content

Commit 483796c

Browse files
committed
Fix score function parameter mistake in test_weighted_boosting
1 parent e7eb17c commit 483796c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

sklearn/ensemble/tests/test_weight_boosting.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -308,8 +308,8 @@ def fit(self, X, y, sample_weight=None):
308308
assert_array_equal(sparse_results, dense_results)
309309

310310
# score
311-
sparse_results = sparse_classifier.score(X_test_sparse, sparse_y_pred)
312-
dense_results = dense_classifier.score(X_test, dense_y_pred)
311+
sparse_results = sparse_classifier.score(X_test_sparse, y_test)
312+
dense_results = dense_classifier.score(X_test, y_test)
313313
assert_array_equal(sparse_results, dense_results)
314314

315315
# staged_decision_function
@@ -333,8 +333,8 @@ def fit(self, X, y, sample_weight=None):
333333

334334
# staged_score
335335
sparse_results = sparse_classifier.staged_score(X_test_sparse,
336-
sparse_y_pred)
337-
dense_results = dense_classifier.staged_score(X_test, dense_y_pred)
336+
y_test)
337+
dense_results = dense_classifier.staged_score(X_test, y_test)
338338
for sprase_res, dense_res in zip(sparse_results, dense_results):
339339
assert_array_equal(sprase_res, dense_res)
340340

0 commit comments

Comments
 (0)