Skip to main content
. 2023 Jun 12;23(12):5513. doi: 10.3390/s23125513
Algorithm 1: PSA-MNMF
Input: Dataset A={a1,…., an}, a set of partitions B of data points B = {b1,b2, ….., bt} such that each partition B consists of a set of clustering Dt= {d1t, d2t, …., dkt} that uses a selected clustering methodology.
Output: The set H of B heterogeneous clusterings that included the 10 best and highest F-scores (or performance metrics α) and appeared in all 100 runs when using the exhaustive search method.
 Initialization: 
Calculate the X-cluster= {The results of each clustering
Initialize H= {}. Define the connectivity matric CM as follows:
            CMij(bt)={1 (i,j) Dk(bt)0 (i,j) Dk(bt) 
Define a matrix Nixk such that in each row only “1” can exist and the rest of the values should be zeros. Calculate the NNT. If i belongs to k, the results will equal 1, otherwise they will equal zero. Define L as L = NTN.
  Begin 
Step 1: The optimization equation for PSA-NMF is calculated using the equation: minN, L0||CM˜N˜LN˜T||2, where NTN=1
Step 2: At each iteration, the N value will be updated using this equation: Noi  Noi (CM N L)oi(NNTCM NL)oi
Step 3: At each iteration, the L is updated: Lie  Lie (NTCM N)ie(NTN L NTN)ie
Step 5: The exhaustive method finds the best performance metric from among the top 10 recorded combinations.
Step 4: Steps 1-4 are repeated 100 times.
Step 6: The final consensus clustering solution assigns each data point in the input data set to a consensus cluster.
Step 7: The algorithm returns H and performance metrics α (including F-score, accuracy, precision, and recall)
End