compute_medoid_indices_from_features¶
- fast_plscan.compute_medoid_indices_from_features(data, core_distances, probabilities, labels, *, metric='euclidean', metric_kws=None)¶
Compute cluster medoid indices from feature vectors.
Assumes inputs are already validated. Uses probability-weighted mutual reachability distances within each cluster.
- Parameters:
data (
ndarray[tuple[int,int],dtype[single]]) – Feature matrix of shape(n_samples, n_features).core_distances (
ndarray[tuple[int],dtype[single]]) – Core distances for all points, shape(n_samples,).probabilities (
ndarray[tuple[int],dtype[single]]) – Cluster membership probabilities for all points, shape(n_samples,).labels (
ndarray[tuple[int],dtype[int_]]) – Dense cluster labels with shape(n_samples,).metric (
str, default:'euclidean') – Pairwise distance metric.metric_kws (
dict[str,Any] |None, default:None) – Optional metric keyword arguments.
- Return type:
- Returns:
medoid_indices – Integer array of shape
(n_clusters,)with indices intodata.