tabular_trees.TabularTrees
- class tabular_trees.TabularTrees(trees, get_root_node_given_tree)[source]
Bases:
objectGeneric tree structure in tabular format.
- __init__(trees, get_root_node_given_tree)[source]
Initialise the TabularTrees object.
- Parameters:
trees (pd.DataFrame) – Tree data in tabular structure.
Methods
__init__(trees, get_root_node_given_tree)Initialise the TabularTrees object.
Attributes
List of columns required in tree data.
List of columns to sort tree data by.
Tree data.
Function that returns the name of the root node for a given tree index.
- REQUIRED_COLUMNS = ['tree', 'node', 'left_child', 'right_child', 'missing', 'feature', 'split_condition', 'leaf', 'count', 'prediction']
List of columns required in tree data.
- SORT_BY_COLUMNS = ['tree', 'node']
List of columns to sort tree data by.
- get_root_node_given_tree
Function that returns the name of the root node for a given tree index.
- trees
Tree data.