Medial Code Documentation
Loading...
Searching...
No Matches
param.h
1
4#pragma once
5
6#include <cstddef> // for size_t
7
8#include "xgboost/parameter.h" // for XGBoostParameter
9#include "xgboost/tree_model.h" // for RegTree
10
11namespace xgboost::tree {
12struct HistMakerTrainParam : public XGBoostParameter<HistMakerTrainParam> {
13 constexpr static std::size_t DefaultNodes() { return static_cast<std::size_t>(1) << 16; }
14
15 bool debug_synchronize{false};
16 std::size_t max_cached_hist_node{DefaultNodes()};
17
18 void CheckTreesSynchronized(RegTree const* local_tree) const;
19
20 // declare parameters
21 DMLC_DECLARE_PARAMETER(HistMakerTrainParam) {
22 DMLC_DECLARE_FIELD(debug_synchronize)
23 .set_default(false)
24 .describe("Check if all distributed tree are identical after tree construction.");
25 DMLC_DECLARE_FIELD(max_cached_hist_node)
26 .set_default(DefaultNodes())
27 .set_lower_bound(1)
28 .describe("Maximum number of nodes in CPU histogram cache. Only for internal usage.");
29 }
30};
31} // namespace xgboost::tree
define regression tree to be the most common tree model.
Definition tree_model.h:158
macro for using C++11 enum class as DMLC parameter
Copyright 2021-2023 by XGBoost Contributors.
Definition tree_updater.h:25
Definition parameter.h:84
Copyright 2014-2023 by Contributors.