xgboost
Public Member Functions | Static Public Member Functions | List of all members
xgboost::MultiTargetTree Class Reference

Tree structure for multi-target model. More...

#include <multi_target_tree_model.h>

Inheritance diagram for xgboost::MultiTargetTree:
Inheritance graph
Collaboration diagram for xgboost::MultiTargetTree:
Collaboration graph

Public Member Functions

 MultiTargetTree (TreeParam const *param)
 
void SetLeaf (bst_node_t nidx, linalg::VectorView< float const > weight)
 Set the weight for a leaf. 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)
 Expand a leaf into split node. More...
 
bool IsLeaf (bst_node_t nidx) const
 
bst_node_t Parent (bst_node_t nidx) const
 
bst_node_t LeftChild (bst_node_t nidx) const
 
bst_node_t RightChild (bst_node_t nidx) const
 
bst_feature_t SplitIndex (bst_node_t nidx) const
 
float SplitCond (bst_node_t nidx) const
 
bool DefaultLeft (bst_node_t nidx) const
 
bst_node_t DefaultChild (bst_node_t nidx) const
 
bst_target_t NumTarget () const
 
std::size_t Size () const
 
bst_node_t Depth (bst_node_t nidx) 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...
 
- Public Member Functions inherited from xgboost::Model
virtual ~Model ()=default
 

Static Public Member Functions

static constexpr bst_node_t InvalidNodeId ()
 

Detailed Description

Tree structure for multi-target model.

Constructor & Destructor Documentation

◆ MultiTargetTree()

xgboost::MultiTargetTree::MultiTargetTree ( TreeParam const *  param)
explicit

Member Function Documentation

◆ DefaultChild()

bst_node_t xgboost::MultiTargetTree::DefaultChild ( bst_node_t  nidx) const
inline

◆ DefaultLeft()

bool xgboost::MultiTargetTree::DefaultLeft ( bst_node_t  nidx) const
inline

◆ Depth()

bst_node_t xgboost::MultiTargetTree::Depth ( bst_node_t  nidx) const
inline

◆ Expand()

void xgboost::MultiTargetTree::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 
)

Expand a leaf into split node.

◆ InvalidNodeId()

static constexpr bst_node_t xgboost::MultiTargetTree::InvalidNodeId ( )
inlinestaticconstexpr

◆ IsLeaf()

bool xgboost::MultiTargetTree::IsLeaf ( bst_node_t  nidx) const
inline

◆ LeafValue()

linalg::VectorView<float const> xgboost::MultiTargetTree::LeafValue ( bst_node_t  nidx) const
inline

◆ LeftChild()

bst_node_t xgboost::MultiTargetTree::LeftChild ( bst_node_t  nidx) const
inline

◆ LoadModel()

void xgboost::MultiTargetTree::LoadModel ( Json const &  in)
overridevirtual

load the model from a JSON object

Parameters
inJSON object where to load the model from

Implements xgboost::Model.

◆ NumTarget()

bst_target_t xgboost::MultiTargetTree::NumTarget ( ) const

◆ Parent()

bst_node_t xgboost::MultiTargetTree::Parent ( bst_node_t  nidx) const
inline

◆ RightChild()

bst_node_t xgboost::MultiTargetTree::RightChild ( bst_node_t  nidx) const
inline

◆ SaveModel()

void xgboost::MultiTargetTree::SaveModel ( Json out) const
overridevirtual

saves the model config to a JSON object

Parameters
outJSON container where to save the model to

Implements xgboost::Model.

◆ SetLeaf()

void xgboost::MultiTargetTree::SetLeaf ( bst_node_t  nidx,
linalg::VectorView< float const >  weight 
)

Set the weight for a leaf.

◆ Size()

std::size_t xgboost::MultiTargetTree::Size ( ) const

◆ SplitCond()

float xgboost::MultiTargetTree::SplitCond ( bst_node_t  nidx) const
inline

◆ SplitIndex()

bst_feature_t xgboost::MultiTargetTree::SplitIndex ( bst_node_t  nidx) const
inline

The documentation for this class was generated from the following file: