compute_centroids_from_features¶
- fast_plscan.compute_centroids_from_features(data, probabilities, labels)¶
Compute probability-weighted centroids from feature vectors.
Assumes inputs are already validated.
- Parameters:
data (
ndarray[tuple[int,int],dtype[single]]) – Feature matrix of shape(n_samples, n_features).probabilities (
ndarray[tuple[int],dtype[single]]) – Cluster membership probabilities for all points, shape(n_samples,).labels (
ndarray[tuple[int],dtype[int_]]) – Cluster labels with shape(n_samples,).
- Return type:
- Returns:
centroids – Float32 array of shape
(n_clusters, n_features).