Support learning rate for zero-hessian objectives. (#8866)
This commit is contained in:
@@ -1018,14 +1018,18 @@ def test_XGBClassifier_resume():
|
||||
|
||||
|
||||
def test_constraint_parameters():
|
||||
reg = xgb.XGBRegressor(interaction_constraints='[[0, 1], [2, 3, 4]]')
|
||||
reg = xgb.XGBRegressor(interaction_constraints="[[0, 1], [2, 3, 4]]")
|
||||
X = np.random.randn(10, 10)
|
||||
y = np.random.randn(10)
|
||||
reg.fit(X, y)
|
||||
|
||||
config = json.loads(reg.get_booster().save_config())
|
||||
assert config['learner']['gradient_booster']['updater']['grow_colmaker'][
|
||||
'train_param']['interaction_constraints'] == '[[0, 1], [2, 3, 4]]'
|
||||
assert (
|
||||
config["learner"]["gradient_booster"]["tree_train_param"][
|
||||
"interaction_constraints"
|
||||
]
|
||||
== "[[0, 1], [2, 3, 4]]"
|
||||
)
|
||||
|
||||
|
||||
def test_parameter_validation():
|
||||
|
||||
Reference in New Issue
Block a user