NNSOM.utils.count_classes_in_cluster
- NNSOM.utils.count_classes_in_cluster(cat_feature, clust)[source]
Count occurrences of each class in every 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.
- Returns:
cluster_counts – Entry
[i, j]is the count of classjin clusteri.- Return type:
np.ndarray of int, shape (numNeurons, numClasses)