View full-text article in PMC Int J Mol Sci. 2025 Nov 27;26(23):11520. doi: 10.3390/ijms262311520 Search in PMC Search in PubMed View in NLM Catalog Add to search Copyright and License information © 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/). PMC Copyright notice Algorithm 2 Lloyd’s algorithm with similarity matrix as input Mcorr←inputdata Initialization:randomcentroidsC={c1,…,ck} Repeatforrange(i=1,i=2,…,i=k) b(x)=argmini{Δ(x,ci)},∀x∈Mcorr UpdateallclusterscentroidsinC: ci=1|A|i∑x∈Aix,∀i∈{1,2,…,k} UntilMean(clustercenters)stopchanging