classix.merging.density_merging
- classix.merging.density_merging(data, splist, radius, sort_vals, half_nrm2)[source]
Implement CLASSIX’s merging with disjoint-set data structure, default choice for the merging.
Parameters
- datanumpy.ndarray
The input that is array-like of shape (n_samples,).
- splistnumpy.ndarray
Represent the list of starting points information formed in the aggregation. list of [ starting point index of current group, sorting values, and number of group elements ]
- radiusfloat
The tolerance to control the aggregation. If the distance between the starting point of a group and another data point is less than or equal to the tolerance, the point is allocated to that group. For details, we refer users to [1].
- sort_valsnumpy.ndarray
Sorting values.
- half_nrm2numpy.ndarray
Precomputed values for distance computation.
Returns
- labels_setlist
Connected components of graph with groups as vertices.
- connected_pairs_storelist
List for connected group labels.
References
[1] X. Chen and S. Güttel. Fast and explainable sorted based clustering, 2022