Brought the silent parameter for the SKLearn-like API back, marked it deprecated. (#4255)

* Brought the silent parameter for the SKLearn-like API back, marked it deprecated.

- added deprecation notice and warning
- removed silent from the tests for the SKLearn-like API
This commit is contained in:
Andy Adinets
2019-03-13 21:45:08 +01:00
committed by Rory Mitchell
parent b833b642ec
commit 4352fcdb15
2 changed files with 32 additions and 14 deletions

View File

@@ -380,7 +380,7 @@ def test_sklearn_nfolds_cv():
params = {
'max_depth': 2,
'eta': 1,
'silent': 1,
'verbosity': 0,
'objective':
'multi:softprob',
'num_class': 3
@@ -408,7 +408,7 @@ def test_split_value_histograms():
y = digits_2class['target']
dm = xgb.DMatrix(X, label=y)
params = {'max_depth': 6, 'eta': 0.01, 'silent': 1,
params = {'max_depth': 6, 'eta': 0.01, 'verbosity': 0,
'objective': 'binary:logistic'}
gbdt = xgb.train(params, dm, num_boost_round=10)
@@ -604,7 +604,7 @@ def test_RFECV():
X, y = load_boston(return_X_y=True)
bst = xgb.XGBClassifier(booster='gblinear', learning_rate=0.1,
n_estimators=10, n_jobs=1, objective='reg:linear',
random_state=0, silent=True)
random_state=0, verbosity=0)
rfecv = RFECV(
estimator=bst, step=1, cv=3, scoring='neg_mean_squared_error')
rfecv.fit(X, y)
@@ -614,7 +614,7 @@ def test_RFECV():
bst = xgb.XGBClassifier(booster='gblinear', learning_rate=0.1,
n_estimators=10, n_jobs=1,
objective='binary:logistic',
random_state=0, silent=True)
random_state=0, verbosity=0)
rfecv = RFECV(estimator=bst, step=1, cv=3, scoring='roc_auc')
rfecv.fit(X, y)
@@ -625,7 +625,7 @@ def test_RFECV():
n_estimators=10, n_jobs=1,
objective='multi:softprob',
random_state=0, reg_alpha=0.001, reg_lambda=0.01,
scale_pos_weight=0.5, silent=True)
scale_pos_weight=0.5, verbosity=0)
rfecv = RFECV(estimator=bst, step=1, cv=3, scoring='neg_log_loss')
rfecv.fit(X, y)