compute_exemplar_indices_from_trees

fast_plscan.compute_exemplar_indices_from_trees(leaf_tree, condensed_tree, labels, num_points)

Compute exemplar point indices per cluster from fitted tree structures.

Assumes inputs are already validated.

Parameters:
  • leaf_tree (LeafTree) – Fitted leaf tree.

  • condensed_tree (CondensedTree) – Fitted condensed tree.

  • labels (ndarray[tuple[int], dtype[int_]]) – Dense cluster labels with shape (n_samples,).

  • num_points (int) – Number of points in the original dataset.

Return type:

list[ndarray[tuple[int], dtype[int_]]]

Returns:

exemplars_per_cluster – List of arrays with exemplar point indices per cluster.