A tree node class for representing a cluster. Leaf nodes correspond to original observations, while non-leaf nodes correspond to non-singleton clusters.
The to_tree function converts a matrix returned by the linkage function into an easy-to-use tree representation.
Seealso : |
|
---|
Methods
get_count() | The number of leaf nodes (original observations) belonging to the cluster node nd. |
get_id() | The identifier of the target node. |
get_left() | Returns a reference to the left child tree object. |
get_right() | Returns a reference to the right child tree object. |
is_leaf() | Returns True iff the target node is a leaf. |
pre_order([func]) | Performs preorder traversal without recursive function calls. |