Reduce regularization for CPU gblinear. (#8013)

This commit is contained in:
Jiaming Yuan 2022-06-21 01:05:27 +08:00 committed by GitHub
parent d285d6ba2a
commit 4a87ea49b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -38,9 +38,14 @@ class TestLinear:
# Loss is not guaranteed to always decrease because of regularisation parameters # Loss is not guaranteed to always decrease because of regularisation parameters
# We test a weaker condition that the loss has not increased between the first and last # We test a weaker condition that the loss has not increased between the first and last
# iteration # iteration
@given(parameter_strategy, strategies.integers(10, 50), @given(
tm.dataset_strategy, coord_strategy, strategies.floats(1e-5, 1.0), parameter_strategy,
strategies.floats(1e-5, 1.0)) strategies.integers(10, 50),
tm.dataset_strategy,
coord_strategy,
strategies.floats(1e-5, 0.8),
strategies.floats(1e-5, 0.8)
)
@settings(deadline=None, print_blob=True) @settings(deadline=None, print_blob=True)
def test_coordinate_regularised(self, param, num_rounds, dataset, coord_param, alpha, lambd): def test_coordinate_regularised(self, param, num_rounds, dataset, coord_param, alpha, lambd):
param['updater'] = 'coord_descent' param['updater'] = 'coord_descent'