classix.aggregation.precompute_aggregate
- classix.aggregation.precompute_aggregate(data, sorting='pca', tol=0.5)[source]
Aggregate the data using precomputation
Parameters
- datanumpy.ndarray
The input that is array-like of shape (n_samples,).
- sortingstr
The sorting way referred for aggregation, default=’pca’, other options: ‘norm-mean’, ‘norm-orthant’.
- tolfloat
The tolerance to control the aggregation, if the distance between the starting point and the object is less than or equal than the tolerance, the object should allocated to the group which starting point belongs to.
Returns
- labels (list)
The group categories of the data after aggregation.
- splist (list)
The list of the starting points.
- nr_dist (int) :
The number of pairwise distance calculations.
- ind (numpy.ndarray):
Array storing Sorting indices.
- sort_vals (numpy.ndarray):
Sorting values.
- data (numpy.ndarray):
Sorted data.
- half_nrm2 (numpy.ndarray):
Precomputed values for distance computation.