{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,6,20]],"date-time":"2026-06-20T01:45:26Z","timestamp":1781919926687,"version":"3.54.5"},"reference-count":28,"publisher":"MDPI AG","issue":"7","license":[{"start":{"date-parts":[[2023,7,20]],"date-time":"2023-07-20T00:00:00Z","timestamp":1689811200000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0\/"}],"content-domain":{"domain":[],"crossmark-restriction":false},"short-container-title":["Algorithms"],"abstract":"<jats:p>This paper proposes two algorithms for clustering data, which are variable-sized sets of elementary items. An example of such data occurs in the analysis of a medical diagnosis, where the goal is to detect human subjects who share common diseases to possibly predict future illnesses from previous medical history. The first proposed algorithm is based on K-medoids and the second algorithm extends the random swap algorithm, which has proven to be capable of efficient and careful clustering; both algorithms depend on a distance function among data objects (sets), which can use application-sensitive weights or priorities. The proposed distance function makes it possible to exploit several seeding methods that can improve clustering accuracy. A key factor in the two algorithms is their parallel implementation in Java, based on functional programming using streams and lambda expressions. The use of parallelism smooths out the O(N2) computational cost behind K-medoids and clustering indexes such as the Silhouette index and allows for the handling of non-trivial datasets. This paper applies the algorithms to several benchmark case studies of sets and demonstrates how accurate and time-efficient clustering solutions can be achieved.<\/jats:p>","DOI":"10.3390\/a16070349","type":"journal-article","created":{"date-parts":[[2023,7,21]],"date-time":"2023-07-21T01:58:38Z","timestamp":1689904718000},"page":"349","update-policy":"https:\/\/doi.org\/10.3390\/mdpi_crossmark_policy","source":"Crossref","is-referenced-by-count":7,"title":["Two Medoid-Based Algorithms for Clustering Sets"],"prefix":"10.3390","volume":"16","author":[{"ORCID":"https:\/\/orcid.org\/0000-0001-6577-4777","authenticated-orcid":false,"given":"Libero","family":"Nigro","sequence":"first","affiliation":[{"name":"Engineering Department of Informatics Modelling Electronics and Systems Science, University of Calabria, 87036 Rende, Italy"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-9554-2827","authenticated-orcid":false,"given":"Pasi","family":"Fr\u00e4nti","sequence":"additional","affiliation":[{"name":"School of Computing, Machine Learning Group, University of Eastern Finland, P.O. Box 111, 80101 Joensuu, Finland"}],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"1968","published-online":{"date-parts":[[2023,7,20]]},"reference":[{"key":"ref_1","doi-asserted-by":"crossref","first-page":"129","DOI":"10.1109\/TIT.1982.1056489","article-title":"Least squares quantization in PCM","volume":"28","author":"Lloyd","year":"1982","journal-title":"IEEE Trans. Inf. Theory"},{"key":"ref_2","doi-asserted-by":"crossref","first-page":"651","DOI":"10.1016\/j.patrec.2009.09.011","article-title":"Data clustering: 50 years beyond K-means","volume":"31","author":"Jain","year":"2010","journal-title":"Pattern Recognit. Lett."},{"key":"ref_3","doi-asserted-by":"crossref","first-page":"4743","DOI":"10.1007\/s10489-018-1238-7","article-title":"K-means properties on six clustering benchmark datasets","volume":"48","author":"Sieranoja","year":"2018","journal-title":"Appl. Intell."},{"key":"ref_4","doi-asserted-by":"crossref","first-page":"95","DOI":"10.1016\/j.patcog.2019.04.014","article-title":"How much can k-means be improved by using better initialization and repeats?","volume":"93","author":"Sieranoja","year":"2019","journal-title":"Pattern Recognit."},{"key":"ref_5","unstructured":"Hautam\u00e4ki, V., P\u00f6ll\u00e4nen, A., Kinnunen, T., Lee, K.A., Li, H., and Fr\u00e4nti, P. (2014). Structural, Syntactic, and Statistical Pattern Recognition, Proceedings of the Joint IAPR International Workshop, S+ SSPR, Joensuu, Finland, 20\u201322 August 2014, Springer."},{"key":"ref_6","unstructured":"Jubran, I., Tukan, M., Maalouf, A., and Feldman, D. (2020, January 13\u201318). Sets clustering. Proceedings of the International Conference on Machine Learning, Virtual."},{"key":"ref_7","unstructured":"He, Z., Xu, X., Deng, S., and Dong, B. (2005). K-Histograms: An efficient clustering algorithm for categorical dataset. arXiv."},{"key":"ref_8","doi-asserted-by":"crossref","first-page":"109454","DOI":"10.1016\/j.patcog.2023.109454","article-title":"K-sets and k-swaps algorithms for clustering sets","volume":"139","author":"Rezaei","year":"2023","journal-title":"Pattern Recognit."},{"key":"ref_9","unstructured":"Kaufman, L., and Rousseeuw, P.J. (2023, July 13). Clustering by Means of Medoids. Statistical Data Analysis Based on the L1\u2013Norm and Related Methods. Available online: https:\/\/wis.kuleuven.be\/stat\/robust\/papers\/publications-1987\/kaufmanrousseeuw-clusteringbymedoids-l1norm-1987.pdf."},{"key":"ref_10","doi-asserted-by":"crossref","first-page":"3336","DOI":"10.1016\/j.eswa.2008.01.039","article-title":"A simple and fast algorithm for K-medoids clustering","volume":"36","author":"Park","year":"2009","journal-title":"Expert Syst. Appl."},{"key":"ref_11","doi-asserted-by":"crossref","first-page":"13","DOI":"10.1186\/s40537-018-0122-y","article-title":"Efficiency of random swap clustering","volume":"5","year":"2018","journal-title":"J. Big Data"},{"key":"ref_12","doi-asserted-by":"crossref","first-page":"102712","DOI":"10.1016\/j.simpat.2022.102712","article-title":"Parallel Random Swap: A reliable and efficient clustering algorithm in Java","volume":"124","author":"Nigro","year":"2023","journal-title":"Simul. Model. Pract. Theory"},{"key":"ref_13","first-page":"11","article-title":"Comparison Jaccard similarity, Cosine Similarity and Combined Both of the Data Clustering with Shared Nearest Neighbor Method","volume":"5","author":"Zahrotun","year":"2016","journal-title":"Comput. Eng. Appl. J."},{"key":"ref_14","unstructured":"Arthur, D., and Vassilvitskii, S. (2023, July 13). K-Means++: The Advantages of Careful Seeding. Proceedings of the ACM-SIAM Symposium on Discrete Algorithms. Available online: https:\/\/ilpubs.stanford.edu:8090\/778\/."},{"key":"ref_15","doi-asserted-by":"crossref","first-page":"200","DOI":"10.1016\/j.eswa.2012.07.021","article-title":"A comparative study of efficient initialization methods for the k-means clustering algorithm","volume":"40","author":"Celebi","year":"2013","journal-title":"Expert Syst. Appl."},{"key":"ref_16","doi-asserted-by":"crossref","first-page":"1975","DOI":"10.1007\/s10994-021-06021-7","article-title":"An empirical comparison between stochastic and deterministic centroid initialisation for K-means variations","volume":"110","author":"Vouros","year":"2021","journal-title":"Mach. Learn."},{"key":"ref_17","unstructured":"Baldassi, C. (2020). Recombinator K-Means: A Population-Based Algorithm that Exploits K-Means++ for Recombination, Artificial Intelligence Lab, Institute for Data Science and Analytics, Bocconi University."},{"key":"ref_18","doi-asserted-by":"crossref","first-page":"991","DOI":"10.1109\/TEVC.2022.3144134","article-title":"Recombinator-k-Means: An Evolutionary Algorithm That Exploits k-Means++ for Recombination","volume":"26","author":"Baldassi","year":"2022","journal-title":"IEEE Trans. Evol. Comput."},{"key":"ref_19","unstructured":"Urma, R.G., Fusco, M., and Mycroft, A. (2019). Modern Java in Action, Manning, Shelter Island, Simon Schuster."},{"key":"ref_20","doi-asserted-by":"crossref","unstructured":"Nigro, L. (2022). Performance of Parallel K-Means Algorithms in Java. Algorithms, 15.","DOI":"10.3390\/a15040117"},{"key":"ref_21","unstructured":"(2023, July 13). ICD-10 Version: 2019. Available online: https:\/\/icd.who.int\/browse10\/2019\/en#\/XVIII."},{"key":"ref_22","unstructured":"(2023, July 13). Repository of Datasets. Available online: https:\/\/cs.uef.fi\/sipu\/datasets\/."},{"key":"ref_23","doi-asserted-by":"crossref","first-page":"2173","DOI":"10.1109\/TKDE.2016.2551240","article-title":"Set Matching Measures for External Cluster Validity","volume":"28","author":"Rezaei","year":"2016","journal-title":"IEEE Trans. Knowl. Data Eng."},{"key":"ref_24","first-page":"1","article-title":"The impact of random models on clustering similarity","volume":"18","author":"Gates","year":"2017","journal-title":"J. Mach. Learn. Res."},{"key":"ref_25","doi-asserted-by":"crossref","first-page":"3034","DOI":"10.1016\/j.patcog.2014.03.017","article-title":"Centroid index: Cluster level similarity measure","volume":"47","author":"Rezaei","year":"2014","journal-title":"Pattern Recognit."},{"key":"ref_26","unstructured":"Fr\u00e4nti, P., and Rezaei, M. Generalized centroid index to different clustering models. Proceedings of the Workshop on Structural, Syntactic, and Statistical Pattern Recognition."},{"key":"ref_27","doi-asserted-by":"crossref","first-page":"109144","DOI":"10.1016\/j.patcog.2022.109144","article-title":"Finding compact and well-separated clusters: Clustering using silhouette coefficients","volume":"135","author":"Bagirov","year":"2023","journal-title":"Pattern Recognit."},{"key":"ref_28","doi-asserted-by":"crossref","unstructured":"Jimoh, B., Mariescu-Istodor, R., and Fr\u00e4nti, P. (2022). Is Medoid Suitable for Averaging GPS Trajectories?. ISPRS Int. J. Geo-Inf., 11.","DOI":"10.3390\/ijgi11020133"}],"container-title":["Algorithms"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/www.mdpi.com\/1999-4893\/16\/7\/349\/pdf","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,10,10]],"date-time":"2025-10-10T20:16:04Z","timestamp":1760127364000},"score":1,"resource":{"primary":{"URL":"https:\/\/www.mdpi.com\/1999-4893\/16\/7\/349"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2023,7,20]]},"references-count":28,"journal-issue":{"issue":"7","published-online":{"date-parts":[[2023,7]]}},"alternative-id":["a16070349"],"URL":"https:\/\/doi.org\/10.3390\/a16070349","relation":{},"ISSN":["1999-4893"],"issn-type":[{"value":"1999-4893","type":"electronic"}],"subject":[],"published":{"date-parts":[[2023,7,20]]}}}