drcme.ephys_morph_clustering.refine_assignments¶
- drcme.ephys_morph_clustering.refine_assignments(clust_labels, shared_norm)[source]¶
Reassign samples to the best-matched clusters
All samples that have a better-matching cluster are reassigned at a time. Since reassignment changes the matching rates, the procedure is repeated until assignments no longer change or are identical to a previously encountered set of assignments (meaning that the algorithm has entered a cycle).
- Parameters
clust_labels (array) – Cluster assignments
shared_norm (array) – Matrix of normalized cell-by-cell co-clustering rates
- Returns
New cluster assignments
- Return type
array