bartz.grove¶
Functions to create, manipulate, and check binary decision trees.
Tree representation¶
|
A protocol for dataclasses that represent trees. |
|
Implementation of |
|
Return whether the trees have vector-valued leaves. |
Evaluation¶
|
Evaluate an ensemble of trees at an array of points. |
|
Find the leaf where a point falls into. |
|
Find the leaves where points falls into for each tree in a set. |
Tree and node properties¶
|
Return a mask indicating the leaf nodes in a tree. |
|
Return a mask indicating the nodes with leaf (and only leaf) children. |
|
Return the maximum depth of a tree. |
|
Measure the depth of the tree. |
|
Return the depth of each node in a binary tree. |
Forest summaries¶
|
Return the average number of leaves per tree in a set of trees. |
|
Histogram the depths of a set of trees. |
|
Histogram points-per-node counts in a set of trees. |
|
Count how many times each variable appears in a tree. |
Validation and inspection¶
|
Check the validity of a set of trees. |
|
Describe an error code returned by |
|
Convert a tree to a human-readable string. |