|
Medial Code Documentation
|
bart tree node More...
#include <BART.h>
Public Member Functions | |
| bart_node () | |
| a simple default ctor | |
| bart_node (const bart_node &cp) | |
| a copy ctor shallow copy. | |
| void | list_all_nodes (vector< bart_node * > &all_nodes) |
| populating all_nodes with flatted array of all nodes from current node including this node. | |
| int | depth () |
| returning node depth | |
| float | variance (const vector< float > &y) |
| calculating node variance in the observations in the node | |
| void | deep_clone (bart_node *&target) |
| deep copying of the node and all it's acendents by allocating new copies of all nodes | |
| void | print_tree (const vector< vector< float > > &feature_sorted_values) const |
| printing tree from current node | |
| void | validate_tree (const vector< vector< float > > &feature_sorted_values, const vector< float > &x, int nftrs) const |
| for debug - validating the tree structure is correct with childs\parents pointers and that the observations in each nodes are correct. | |
Data Fields | |
| int | feature_number |
| feature number in node for split | |
| int | split_index |
| the split index of the feature sorted unique value as split value in node | |
| float | node_value |
| the output value for input that reaches this node | |
| bart_node * | parent |
| the parent node | |
| bart_node * | childs [2] |
| the left,right childs | |
| vector< int > | observation_indexes |
| the indexes of observations in this node | |
| bool | mark_change |
| mark change for calculating node_value | |
| int | num_feature_options |
| number of features to select for likelihood calc | |
| int | num_split_options |
| number of split value to select after feature select for likelihood calc | |
bart tree node
|
inline |
a copy ctor shallow copy.
not cloing or allocating memory for childs\parents nodes