|
| | MultiTargetTree (TreeParam const *param) |
| |
| | MultiTargetTree (MultiTargetTree const &that) |
| |
| MultiTargetTree & | operator= (MultiTargetTree const &that)=delete |
| |
| | MultiTargetTree (MultiTargetTree &&that)=delete |
| |
| MultiTargetTree & | operator= (MultiTargetTree &&that)=delete |
| |
| void | SetRoot (linalg::VectorView< float const > weight, float sum_hess) |
| | Set the weight and statistics for the root. More...
|
| |
| void | Expand (bst_node_t nidx, bst_feature_t split_idx, float split_cond, bool default_left, linalg::VectorView< float const > base_weight, linalg::VectorView< float const > left_weight, linalg::VectorView< float const > right_weight, float loss_chg, float sum_hess, float left_sum, float right_sum) |
| | Expand a leaf into split node. More...
|
| |
| void | SetLeaves (std::vector< bst_node_t > leaves, common::Span< float const > weights) |
| |
| void | SetLeaves () |
| | Copy base weight into leaf weight for a non-reduced multi-target tree. More...
|
| |
| bool | IsLeaf (bst_node_t nidx) const |
| |
| bst_node_t | LeftChild (bst_node_t nidx) const |
| |
| bst_node_t | RightChild (bst_node_t nidx) const |
| |
| bst_target_t | NumTargets () const |
| | Number of targets (size of a leaf). More...
|
| |
| bst_target_t | NumSplitTargets () const |
| | Number of reduced targets. More...
|
| |
| auto | NumLeaves () const |
| |
| std::size_t | Size () const |
| |
| MultiTargetTree * | Copy (TreeParam const *param) const |
| |
| common::Span< float const > | LeafWeights (DeviceOrd device) const |
| |
| linalg::VectorView< float const > | LeafValue (bst_node_t nidx) const |
| |
| void | LoadModel (Json const &in) override |
| | load the model from a JSON object More...
|
| |
| void | SaveModel (Json *out) const override |
| | saves the model config to a JSON object More...
|
| |
| std::size_t | MemCostBytes () const |
| |
| virtual | ~Model ()=default |
| |
Tree structure for multi-target model.
In order to support reduced gradient, the internal storage distinguishes weights between base weights and leaf weights. The former is the weight calculated from split gradient, and the later is the weight calculated from value gradient and used as outputs. Every node has a base weight, but only leaves have leaf weights.
To access the leaf weights, we re-use the right child to store leaf indices. For split nodes, the right_ member stores their right child node indices, for leaf nodes, the right_ member stores the corresponding leaf weight indices.