{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,6,20]],"date-time":"2026-06-20T01:45:27Z","timestamp":1781919927385,"version":"3.54.5"},"reference-count":31,"publisher":"MDPI AG","issue":"4","license":[{"start":{"date-parts":[[2022,3,29]],"date-time":"2022-03-29T00:00:00Z","timestamp":1648512000000},"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>K-means is a well-known clustering algorithm often used for its simplicity and potential efficiency. Its properties and limitations have been investigated by many works reported in the literature. K-means, though, suffers from computational problems when dealing with large datasets with many dimensions and great number of clusters. Therefore, many authors have proposed and experimented different techniques for the parallel execution of K-means. This paper describes a novel approach to parallel K-means which, today, is based on commodity multicore machines with shared memory. Two reference implementations in Java are developed and their performances are compared. The first one is structured according to a map\/reduce schema that leverages the built-in multi-threaded concurrency automatically provided by Java to parallel streams. The second one, allocated on the available cores, exploits the parallel programming model of the Theatre actor system, which is control-based, totally lock-free, and purposely relies on threads as coarse-grain \u201cprogramming-in-the-large\u201d units. The experimental results confirm that some good execution performance can be achieved through the implicit and intuitive use of Java concurrency in parallel streams. However, better execution performance can be guaranteed by the modular Theatre implementation which proves more adequate for an exploitation of the computational resources.<\/jats:p>","DOI":"10.3390\/a15040117","type":"journal-article","created":{"date-parts":[[2022,3,29]],"date-time":"2022-03-29T21:40:14Z","timestamp":1648590014000},"page":"117","update-policy":"https:\/\/doi.org\/10.3390\/mdpi_crossmark_policy","source":"Crossref","is-referenced-by-count":16,"title":["Performance of Parallel K-Means Algorithms in Java"],"prefix":"10.3390","volume":"15","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 (DIMES), University of Calabria, 87036 Rende, Italy"}],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"1968","published-online":{"date-parts":[[2022,3,29]]},"reference":[{"key":"ref_1","unstructured":"MacQueen, J. (July, January 21). Some methods for classification and analysis of multivariate observations. Proceedings of the 5th Berkeley Symposium on Mathematical Statistics and Probability, Berkeley, CA, USA."},{"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":"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_4","unstructured":"Qiu, X., Fox, G.C., Yuan, H., Bae, S.H., Chrysanthakopoulos, G., and Nielsen, H.F. (2008, January 3\u20136). Parallel clustering and dimensional scaling on multicore systems. Proceedings of the High Performance Computing & Simulation (HPCS 2008), Nicosia, Cyprus."},{"key":"ref_5","doi-asserted-by":"crossref","unstructured":"Zhang, J., Wu, G., Hu, X., Li, S., and Hao, S. (2011, January 9\u201311). A parallel k-means clustering algorithm with MPI. Proceedings of the IEEE Fourth International Symposium on Parallel Architectures, Algorithms and Programming, NW Washington, DC, USA.","DOI":"10.1109\/PAAP.2011.17"},{"key":"ref_6","first-page":"243","article-title":"Parallel K-means clustering algorithm on NOWs","volume":"1","author":"Kantabutra","year":"2000","journal-title":"NECTEC Tech. J."},{"key":"ref_7","doi-asserted-by":"crossref","unstructured":"Zhao, W., Ma, H., and He, Q. (2009, January 21\u201325). Parallel K-Means clustering based on MapReduce. Proceedings of the IEEE International Conference on Cloud Computing, NW Washington, DC, USA.","DOI":"10.1007\/978-3-642-10665-1_71"},{"key":"ref_8","unstructured":"Bodoia, M. (2022, January 01). MapReduce Algorithms for k-Means Clustering. Available online: https:\/\/stanford.edu\/~rezab\/classes\/cme323\/S16\/projects_reports\/bodoia.pdf."},{"key":"ref_9","doi-asserted-by":"crossref","unstructured":"Naik, D.S.B., Kumar, S.D., and Ramakrishna, S.V. (2013, January 26\u201328). Parallel processing of enhanced K-Means using OpenMP. Proceedings of the IEEE International Conference on Computational Intelligence and Computing Research, Madurai, India.","DOI":"10.1109\/ICCIC.2013.6724291"},{"key":"ref_10","doi-asserted-by":"crossref","first-page":"262","DOI":"10.1016\/j.compeleceng.2017.12.002","article-title":"A GPU-accelerated parallel K-means algorithm","volume":"75","author":"Cuomo","year":"2019","journal-title":"Comput. Electr. Eng."},{"key":"ref_11","unstructured":"Bloch, J. (2018). Effective Java, Addison Wesley. [3rd ed.]."},{"key":"ref_12","unstructured":"Subramaniam, V. (2014). Functional Programming in Java\u2014Harnessing the Power of Java 8 Lambda Expressions, The Pragmatic Programmers, LLC."},{"key":"ref_13","doi-asserted-by":"crossref","first-page":"102189","DOI":"10.1016\/j.simpat.2020.102189","article-title":"Parallel Theatre: A Java actor-framework for high-performance computing","volume":"106","author":"Nigro","year":"2021","journal-title":"Simul. Model. Pract. Theory"},{"key":"ref_14","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_15","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":"Franti","year":"2018","journal-title":"Appl. Intell."},{"key":"ref_16","doi-asserted-by":"crossref","first-page":"994","DOI":"10.1016\/j.patrec.2009.04.013","article-title":"Robust partitional clustering by outlier and density insensitive seeding","volume":"30","author":"Chaoji","year":"2009","journal-title":"Pattern Recognit. Lett."},{"key":"ref_17","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_18","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":"Franti","year":"2019","journal-title":"Pattern Recognit."},{"key":"ref_19","doi-asserted-by":"crossref","unstructured":"Breunig, M.M., Kriegel, H.-P., Ng, R.T., and Sander, J. (2000, January 16\u201318). LOF: Identifying Density-Based Local Outliers. Proceedings of the 2000 ACM SIGMOD International Conference on Management of Data, Dallas, TX, USA.","DOI":"10.1145\/342009.335388"},{"key":"ref_20","doi-asserted-by":"crossref","first-page":"343","DOI":"10.1016\/j.simpat.2018.07.011","article-title":"Qualitative and quantitative model checking of distributed probabilistic timed actors","volume":"87","author":"Nigro","year":"2018","journal-title":"Simul. Model. Pract. Theory"},{"key":"ref_21","first-page":"233","article-title":"A development methodology for cyber-physical systems based on deterministic Theatre with hybrid actors","volume":"25","author":"Cicirelli","year":"2021","journal-title":"TASK Q. Spec. Issue Cyber-Phys. Syst."},{"key":"ref_22","doi-asserted-by":"crossref","unstructured":"Agha, G. (1986). Actors: A Model of Concurrent Computation in Distributed Systems. [Ph.D. Thesis, MIT Artificial Intelligence Laboratory].","DOI":"10.7551\/mitpress\/1086.001.0001"},{"key":"ref_23","doi-asserted-by":"crossref","unstructured":"Karmani, R.K., and Agha, G. (2011). Actors, Springer.","DOI":"10.1007\/978-0-387-09766-4_125"},{"key":"ref_24","unstructured":"(2022, January 01). UCI Machine Learning Repository. Available online: https:\/\/archive.ics.uci.edu\/ml\/datasets."},{"key":"ref_25","doi-asserted-by":"crossref","first-page":"1847","DOI":"10.1002\/cpe.3102","article-title":"A superlinear speedup region for matrix multiplication","volume":"26","author":"Gusev","year":"2014","journal-title":"Concurr. Comput. Pract. Exp."},{"key":"ref_26","unstructured":"Gergel, V. (2012, January 22\u201329). Parallel methods for matrix multiplication. Proceedings of the 2021 Summer School on Concurrency, Saint Petersburg, Russia."},{"key":"ref_27","doi-asserted-by":"crossref","first-page":"1492","DOI":"10.1126\/science.1242072","article-title":"Clustering by fast search and find of density peaks","volume":"344","author":"Rodriguez","year":"2014","journal-title":"Science"},{"key":"ref_28","doi-asserted-by":"crossref","first-page":"740817","DOI":"10.3389\/frai.2021.740817","article-title":"Adaptive initialization method for K-means algorithm","volume":"4","author":"Yang","year":"2021","journal-title":"Front. Artif. Intell."},{"key":"ref_29","doi-asserted-by":"crossref","unstructured":"Lan, X., Li, Q., and Zheng, Y. (2015, January 23\u201325). Density K-means: A new algorithm for centers initialization for K-means. Proceedings of the 6th IEEE International Conference on Software Engineering and Service Science (ICSESS), Beijing, China.","DOI":"10.1109\/ICSESS.2015.7339213"},{"key":"ref_30","unstructured":"Deshpande, A., Kacham, P., and Pratap, R. (2020, January 3\u20136). Robust K-means++. Proceedings of the Conference on Uncertainty in Artificial Intelligence, PMLR, Virtual."},{"key":"ref_31","first-page":"1","article-title":"An initialization method for the K-means algorithm using RNN and coupling degree","volume":"25","author":"Ahmed","year":"2011","journal-title":"Int. J. Comput. Appl."}],"container-title":["Algorithms"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/www.mdpi.com\/1999-4893\/15\/4\/117\/pdf","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,10,10]],"date-time":"2025-10-10T22:45:25Z","timestamp":1760136325000},"score":1,"resource":{"primary":{"URL":"https:\/\/www.mdpi.com\/1999-4893\/15\/4\/117"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2022,3,29]]},"references-count":31,"journal-issue":{"issue":"4","published-online":{"date-parts":[[2022,4]]}},"alternative-id":["a15040117"],"URL":"https:\/\/doi.org\/10.3390\/a15040117","relation":{},"ISSN":["1999-4893"],"issn-type":[{"value":"1999-4893","type":"electronic"}],"subject":[],"published":{"date-parts":[[2022,3,29]]}}}