col_gen_estimator.Leaf

class col_gen_estimator.Leaf[source]

All leaf related information.

Attributes:
id: (int) ID of the leaf.
left_nodes: (list(int)) Set of nodes that take left branch to reach this

leaf.

right_nodes: (list(int)) Set of nodes that take right branch to reach this

leaf.

__init__() None[source]
create_leaf(id, depth) None[source]

Given the id and depth of the leaf, populates the left_nodes and right_nodes attributes.

Parameters:
id: (int) ID of the leaf.
depth: (int) Depth of the tree.

Examples using col_gen_estimator.Leaf

sphx_glr_auto_examples_dtree_experiment.py

Code to launch decision tree experiments.