|
| Tree (bool use_opt_field=true) |
|
| Tree (const Tree &)=delete |
|
Tree & | operator= (const Tree &)=delete |
|
| Tree (Tree &&) noexcept=default |
|
Tree & | operator= (Tree &&) noexcept=default |
|
Tree< ThresholdType, LeafOutputType > | Clone () const |
|
const char * | GetFormatStringForNode () |
|
void | GetPyBuffer (std::vector< PyBufferFrame > *dest) |
|
void | SerializeToFile (FILE *dest_fp) |
|
std::vector< PyBufferFrame >::iterator | InitFromPyBuffer (std::vector< PyBufferFrame >::iterator it) |
|
void | DeserializeFromFile (FILE *src_fp) |
|
void | Init () |
| initialize the model with a single root node
|
|
void | AddChilds (int nid) |
| add child nodes to node More...
|
|
int | LeftChild (int nid) const |
| Getters. More...
|
|
int | RightChild (int nid) const |
| index of the node's right child More...
|
|
int | DefaultChild (int nid) const |
| index of the node's "default" child, used when feature is missing More...
|
|
std::uint32_t | SplitIndex (int nid) const |
| feature index of the node's split condition More...
|
|
bool | DefaultLeft (int nid) const |
| whether to use the left child node, when the feature in the split condition is missing More...
|
|
bool | IsLeaf (int nid) const |
| whether the node is leaf node More...
|
|
LeafOutputType | LeafValue (int nid) const |
| get leaf value of the leaf node More...
|
|
std::vector< LeafOutputType > | LeafVector (int nid) const |
| get leaf vector of the leaf node; useful for multi-class random forest classifier More...
|
|
bool | HasLeafVector (int nid) const |
| tests whether the leaf node has a non-empty leaf vector More...
|
|
ThresholdType | Threshold (int nid) const |
| get threshold of the node More...
|
|
Operator | ComparisonOp (int nid) const |
| get comparison operator More...
|
|
std::vector< std::uint32_t > | MatchingCategories (int nid) const |
| Get list of all categories belonging to the left/right child node. See the categories_list_right_child_ field of each split to determine whether this list represents the right child node or the left child node. Categories are integers ranging from 0 to (n-1), where n is the number of categories in that particular feature. This list is assumed to be in ascending order. More...
|
|
SplitFeatureType | SplitType (int nid) const |
| get feature split type More...
|
|
bool | HasDataCount (int nid) const |
| test whether this node has data count More...
|
|
std::uint64_t | DataCount (int nid) const |
| get data count More...
|
|
bool | HasSumHess (int nid) const |
| test whether this node has hessian sum More...
|
|
double | SumHess (int nid) const |
| get hessian sum More...
|
|
bool | HasGain (int nid) const |
| test whether this node has gain value More...
|
|
double | Gain (int nid) const |
| get gain value More...
|
|
bool | CategoriesListRightChild (int nid) const |
| test whether the list given by MatchingCategories(nid) is associated with the right child node or the left child node More...
|
|
bool | HasCategoricalSplit () const |
| Query whether this tree contains any categorical splits.
|
|
void | SetNumericalSplit (int nid, unsigned split_index, ThresholdType threshold, bool default_left, Operator cmp) |
| Setters. More...
|
|
void | SetCategoricalSplit (int nid, unsigned split_index, bool default_left, const std::vector< uint32_t > &categories_list, bool categories_list_right_child) |
| create a categorical split More...
|
|
void | SetLeaf (int nid, LeafOutputType value) |
| set the leaf value of the node More...
|
|
void | SetLeafVector (int nid, const std::vector< LeafOutputType > &leaf_vector) |
| set the leaf vector of the node; useful for multi-class random forest classifier More...
|
|
void | SetSumHess (int nid, double sum_hess) |
| set the hessian sum of the node More...
|
|
void | SetDataCount (int nid, uint64_t data_count) |
| set the data count of the node More...
|
|
void | SetGain (int nid, double gain) |
| set the gain value of the node More...
|
|
template<typename ThresholdType, typename LeafOutputType>
class treelite::Tree< ThresholdType, LeafOutputType >
in-memory representation of a decision tree
Definition at line 222 of file tree.h.