MCPcopy Create free account
hub / github.com/dmlc/xgboost / test_coordinate

Method test_coordinate

tests/python/test_linear.py:46–52  ·  view source on GitHub ↗
(self, param, num_rounds, dataset, coord_param)

Source from the content-addressed store, hash-verified

44 )
45 @settings(deadline=None, max_examples=20, print_blob=True)
46 def test_coordinate(self, param, num_rounds, dataset, coord_param):
47 param['updater'] = 'coord_descent'
48 param.update(coord_param)
49 param = dataset.set_params(param)
50 result = train_result(param, dataset.get_dmat(), num_rounds)['train'][dataset.metric]
51 note(result)
52 assert tm.non_increasing(result, 5e-4)
53
54 # Loss is not guaranteed to always decrease because of regularisation parameters
55 # We test a weaker condition that the loss has not increased between the first and last

Callers

nothing calls this directly

Calls 4

get_dmatMethod · 0.80
train_resultFunction · 0.70
updateMethod · 0.45
set_paramsMethod · 0.45

Tested by

no test coverage detected