tfdf.py_tree.node.NonLeafNode

A non-leaf node i.e.

Inherits From: AbstractNode

a node containing a split/condition.

condition The binary condition of the node.
pos_child The child to visit when the condition is true.
neg_child The child to visit when the condition is false.
value The value/prediction/output of the node if it was a leaf. Not used during prediction.

Methods

collect_condition_parameter_and_default_evaluation

View source

Extracts the condition values and default evaluations.

pretty

View source

Returns a recursive readable textual representation of a node.

Args
prefix Prefix printed on the left side. Used to print the surrounding edges.
is_pos True/False if the node is a positive/negative child. None if the node is a root.
depth Depth of the node in the tree. There is no assuption of on the depth of a root.
max_depth Maximum depth for representation. Deeper nodes are skipped.

Returns
A pretty-string representing the node and its children.