Brush C++ API
A flexible interpretable machine learning framework
Loading...
Searching...
No Matches
tree_node_< Node > Class Reference

tree node specialization for Node. More...

#include <tree_node.h>

Collaboration diagram for tree_node_< Node >:

Public Member Functions

 tree_node_ ()
 
 tree_node_ (const Node &val)
 
 tree_node_ (Node &&val)
 
template<typename T >
auto fit (const Dataset &d)
 
template<typename T >
auto predict (const Dataset &d, const float **weights=nullptr)
 
template<typename T , typename W >
auto predict (const Dataset &d, const W **weights)
 
string get_model (bool pretty=false) const
 
string get_tree_model (bool pretty=false, string offset="") const
 
int get_complexity () const
 
int get_size (bool include_weight=true) const
 

Public Attributes

tree_node_< Node > * parent
 
tree_node_< Node > * first_child
 
tree_node_< Node > * last_child
 
tree_node_< Node > * prev_sibling
 
tree_node_< Node > * next_sibling
 
Node data
 

Detailed Description

tree node specialization for Node.

Definition at line 22 of file tree_node.h.

Constructor & Destructor Documentation

◆ tree_node_() [1/3]

Definition at line 24 of file tree_node.h.

◆ tree_node_() [2/3]

tree_node_< Node >::tree_node_ ( const Node & val)
inline

Definition at line 28 of file tree_node.h.

◆ tree_node_() [3/3]

tree_node_< Node >::tree_node_ ( Node && val)
inline

Definition at line 32 of file tree_node.h.

Member Function Documentation

◆ fit()

template<typename T >
auto tree_node_< Node >::fit ( const Dataset & d)

◆ get_complexity()

int tree_node_< Node >::get_complexity ( ) const

◆ get_model()

string tree_node_< Node >::get_model ( bool pretty = false) const

◆ get_size()

int tree_node_< Node >::get_size ( bool include_weight = true) const

◆ get_tree_model()

string tree_node_< Node >::get_tree_model ( bool pretty = false,
string offset = "" ) const

◆ predict() [1/2]

template<typename T >
auto tree_node_< Node >::predict ( const Dataset & d,
const float ** weights = nullptr )

◆ predict() [2/2]

template<typename T , typename W >
auto tree_node_< Node >::predict ( const Dataset & d,
const W ** weights )

Member Data Documentation

◆ data

Node tree_node_< Node >::data

Definition at line 39 of file tree_node.h.

◆ first_child

tree_node_<Node>* tree_node_< Node >::first_child

Definition at line 37 of file tree_node.h.

◆ last_child

tree_node_<Node> * tree_node_< Node >::last_child

Definition at line 37 of file tree_node.h.

◆ next_sibling

tree_node_<Node> * tree_node_< Node >::next_sibling

Definition at line 38 of file tree_node.h.

◆ parent

Definition at line 36 of file tree_node.h.

◆ prev_sibling

tree_node_<Node>* tree_node_< Node >::prev_sibling

Definition at line 38 of file tree_node.h.


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