LeafTree

class fast_plscan.plots.LeafTree(leaf_tree, condensed_tree, selected_clusters, persistence_trace, num_points)

A tree describing which clusters exist and how they split along increasing minimum cluster size thresholds. See the documentation for 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 leaf tree parent IDs for the selected clusters.

  • persistence_trace (PersistenceTrace) – The persistence trace for the leaf tree.

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

Methods

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

Creates an icicle plot of the leaf tree.

to_networkx()

Return a NetworkX DiGraph object representing the leaf tree.

to_numpy()

Returns a numpy structured array of the leaf tree.

to_pandas()

Return a pandas dataframe of the leaf tree.