.. _f-treestructure: module ``mltree.tree_structure`` ================================ Short summary +++++++++++++ module ``mlinsights.mltree.tree_structure`` Helpers to investigate a tree structure. :githublink:`%|py|5` Functions +++++++++ +------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------+ | function | truncated documentation | +==========================================================================================+=====================================================================================================================+ | :func:`_get_tree ` | Returns the tree object. | +------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------+ | :func:`predict_leaves ` | Returns the leave every observations of *X* falls into. | +------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------+ | :func:`tree_find_common_node ` | Finds the common node to nodes *i* and *j*. | +------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------+ | :func:`tree_find_path_to_root ` | Lists nodes involved into the path to find node *i*. | +------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------+ | :func:`tree_leave_index ` | Returns the indices of every leave in a tree. | +------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------+ | :func:`tree_leave_neighbors ` | The function determines which leaves are neighbors. The method uses some memory as it creates creates a grid of ... | +------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------+ | :func:`tree_node_parents ` | Returns a dictionary ``{node_id: parent_id}``. | +------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------+ | :func:`tree_node_range ` | Determines the ranges for a node all dimensions. ``nan`` means infinity. | +------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------+ Documentation +++++++++++++ .. automodule:: mlinsights.mltree.tree_structure :members: :special-members: __init__ :show-inheritance: