Compute cluster membership probabilities from PSM
dot-compute_cluster_probs.RdFor each observation, computes the probability of membership in each cluster defined by the representative clustering, derived from the posterior similarity matrix.
Details
The representative labels define a reference partition with clusters \(C_1, \dots, C_K\). For each observation \(i\), this helper averages the posterior similarity scores \(\mathrm{PSM}_{ij}\) over members \(j \in C_k\) to obtain a cluster-membership score for cluster \(k\), and then normalizes those scores to sum to one across clusters.