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

Function train_result

tests/python-gpu/test_gpu_linear.py:25–38  ·  view source on GitHub ↗
(
    param: Dict[str, Any], dmat: xgb.DMatrix, num_rounds: int
)

Source from the content-addressed store, hash-verified

23
24
25def train_result(
26 param: Dict[str, Any], dmat: xgb.DMatrix, num_rounds: int
27) -> Dict[str, Any]:
28 result: Dict[str, Any] = {}
29 booster = xgb.train(
30 param,
31 dmat,
32 num_rounds,
33 [(dmat, "train")],
34 verbose_eval=False,
35 evals_result=result,
36 )
37 assert booster.num_boosted_rounds() == num_rounds
38 return result
39
40
41class TestGPULinear:

Callers 2

test_gpu_coordinateMethod · 0.70

Calls 2

trainMethod · 0.45
num_boosted_roundsMethod · 0.45

Tested by

no test coverage detected