Replace all uses of deprecated function sklearn.datasets.load_boston (#7373)

* Replace all uses of deprecated function sklearn.datasets.load_boston

* More renaming

* Fix bad name

* Update assertion

* Fix n boosted rounds.

* Avoid over regularization.

* Rebase.

* Avoid over regularization.

* Whac-a-mole

Co-authored-by: fis <jm.yuan@outlook.com>
This commit is contained in:
Philip Hyunsu Cho
2022-01-30 04:27:57 -08:00
committed by GitHub
parent b4340abf56
commit c621775f34
13 changed files with 56 additions and 66 deletions

View File

@@ -88,8 +88,8 @@ def test_predict_leaf():
def test_predict_shape():
from sklearn.datasets import load_boston
X, y = load_boston(return_X_y=True)
from sklearn.datasets import fetch_california_housing
X, y = fetch_california_housing(return_X_y=True)
reg = xgb.XGBRegressor(n_estimators=1)
reg.fit(X, y)
predt = reg.get_booster().predict(xgb.DMatrix(X), strict_shape=True)