NNSOM.utils.get_color_labels
- NNSOM.utils.get_color_labels(clust, *listOfIndices)[source]
Generate a colour label per cluster based on majority class membership.
When a single class index array is provided, clusters where that class is the majority are labelled
1; others are labelled0. When multiple arrays are provided, each cluster is labelled with the index of the class that has the most members in it.- Parameters:
- Returns:
color_labels – Integer colour label for each cluster.
Nonefor empty clusters.- Return type:
np.ndarray, shape (numNeurons,)
- Raises:
ValueError – If no class index arrays are provided, or if any argument is not a list or
np.ndarray.