Tree Class in H2O¶
H2O Tree Class¶
H2OTree(model, tree_number, tree_class=None)¶
Represents a model of a Tree built by one of H2O’s algorithms (GBM, Random Forest).
Descriptions for each node to be found in the tree. Contains split threshold if the split is based on numerical column. For cactegorical splits, it contains list of categorical levels for transition from the parent node.
Names of the feature/column used for the split.
An array with left child nodes of tree’s nodes
Categorical levels on split from parent’s node belonging into this node. None for root node or non-categorical splits.
Name (identification) of the model this tree is related to.
representing if NA values go to the left node or right node. The value may be None if node is a leaf or there is no possibility of an NA value appearing on a node.
Array with identification numbers of nodes. Node IDs are generated by H2O.
Values predicted on tree’s nodes.
An array with right child nodes of tree’s nodes
An instance of H2ONode representing the beginning of the tree behind the model. Allows further tree traversal.
Node split thresholds. Split thresholds are not only related to numerical splits, but might be present in case of categorical split as well.
The name of a tree’s class. Number of tree classes equals to the number of levels in categorical response column.
- As there is exactly one class per categorical level, name of tree’s class equals to the corresponding
- categorical level of response column.
- In case of regression and binomial, the name of the categorical level is ignored can be omitted,
- as there is exactly one tree built in both cases.
The order in which the tree has been built in the model.