Overview
Core-SG separates reusable graph construction from repeated hierarchy extraction.
The high-level flow is:
CoreSGClustererreceivesXand the targetk;on the first call, it builds reusable support at
k_max;on later calls, it reuses the existing
core_sg_object;for each target
k, it extracts the current hierarchy;it exposes labels, probabilities, persistence values, and tree objects on the estimator.
The main benefit appears when several k values are needed for the same
dataset.
The default exact algorithm="core-sg" path demonstrates the reuse model but
still depends on dense pairwise distance information, which creates a practical
n_samples limit. The approximate algorithm="score-sg" path is designed
to address that scaling limitation by replacing dense all-pairs construction
with a sparse approximate-neighbor support graph.