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

Function BuildTree

tests/cpp/tree/test_tree_stat.cc:86–95  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

84
85namespace {
86void BuildTree(Context const* ctx, DMatrix* p_fmat, GradientContainer* grad,
87 std::string const& name, Args const& args, RegTree* p_tree) {
88 tree::TrainParam param;
89 param.Init(args);
90 ObjInfo task{ObjInfo::kRegression};
91 auto up = std::unique_ptr<TreeUpdater>{TreeUpdater::Create(name, ctx, &task)};
92 up->Configure({});
93 std::vector<HostDeviceVector<bst_node_t>> position(1);
94 up->Update(&param, grad, p_fmat, common::Span{position}, {p_tree});
95}
96} // namespace
97
98/**

Callers 4

RunMethod · 0.85
UpdateMethod · 0.85
RunMethod · 0.85
RunTestMethod · 0.85

Calls 3

InitMethod · 0.45
ConfigureMethod · 0.45
UpdateMethod · 0.45

Tested by

no test coverage detected