CondensedTree

class fast_plscan.plots.CondensedTree(leaf_tree, condensed_tree, selected_clusters, num_points)

A tree/forest describing which clusters exist and how they split along descending distances. Unlike in HDBSCAN*, this version can represent a forest, rather than a single tree. See the documentation on the to_* conversion methods for details on the output formats!

Parameters:
  • leaf_tree (LeafTree) – The leaf tree object as produced internally.

  • condensed_tree (CondensedTree) – The condensed tree object as produced internally.

  • selected_clusters (ndarray[tuple[int], dtype[uintc]]) – The condensed tree parent IDs for the selected clusters.

  • num_points (int) – The number of points in the condensed tree.

Methods

plot(*[, y, leaf_separation, cmap, ...])

Creates an icicle plot of the condensed tree.

to_networkx()

Return a NetworkX DiGraph object representing the condensed tree.

to_numpy()

Returns a numpy structured array of the condensed tree.

to_pandas()

Returns a pandas dataframe of the condensed tree.