NNSOM.utils.closest_class_cluster
- NNSOM.utils.closest_class_cluster(cat_feature, clust)[source]
Return the class of the closest data point in each cluster.
- Parameters:
cat_feature (array-like, shape (N,)) – Categorical feature values for all data points.
clust (list of array-like) – A list of cluster index arrays sorted by distance to the winning neuron (closest first).
- Returns:
closest_class – Class label of the nearest data point in each cluster.
Nonefor empty clusters.- Return type:
np.ndarray, shape (numNeurons,)