COSIE.downstream_analysis.merge_clusters_to_new_ids
- merge_clusters_to_new_ids(cluster_label_dict, merge_groups)[source]
Merge specified cluster IDs into new classes with IDs starting from current max + 1.
Parameters
- cluster_label_dictdict
Dictionary of {section: np.ndarray of cluster labels}.
- merge_groupslist of list
List of groups to be merged, e.g., [[1, 2, 3], [12, 15]].
Returns
- new_label_dictdict
Updated cluster label dictionary with merged labels.