From 83a078b7e543f60e88a428b3da4c29ece2b6a873 Mon Sep 17 00:00:00 2001 From: Jiaming Yuan Date: Thu, 5 Jan 2023 21:17:05 +0800 Subject: [PATCH] [backport] Fix sklearn test that calls a removed field (#8579) (#8636) Co-authored-by: Rong Ou --- tests/python/test_with_sklearn.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/python/test_with_sklearn.py b/tests/python/test_with_sklearn.py index 17114d2dd..adbbcd02f 100644 --- a/tests/python/test_with_sklearn.py +++ b/tests/python/test_with_sklearn.py @@ -1030,7 +1030,7 @@ def test_pandas_input(): clf_isotonic = CalibratedClassifierCV(model, cv="prefit", method="isotonic") clf_isotonic.fit(train, target) assert isinstance( - clf_isotonic.calibrated_classifiers_[0].base_estimator, xgb.XGBClassifier + clf_isotonic.calibrated_classifiers_[0].estimator, xgb.XGBClassifier ) np.testing.assert_allclose(np.array(clf_isotonic.classes_), np.array([0, 1]))