## 4 The kClusterHub Application  
### Description  
As mentioned above, the contribution of this work is as follows:  
* The development of kClusterHub, a user-friendly web application that allows users to upload datasets, utilizes the elbow method for finding the optimal number of clusters and uses partition-based clustering on any data types;
* kClusterHub is able to automatically select the appropriate clustering algorithm for the selected attributes of the dataset;
* The cluster assignments are presented in a tabular form and in data plots--they can be downloaded;
* The development of a free REST API which offers all operations to developers who wish to integrate kClusterHub's functionality into their own applications. Following the architecture of WebApriori [28], kClusterHub includes three components: (i) the modules for the elbow method and partition-based clustering, (ii) a modern and user-friendly web interface and (iii) the back-end and the REST API service. The application is developed using open-source technologies and Git, with its source code publicly available on GitHub ([[https://github.com/KostisGrf/WebKmeans](https://github.com/KostisGrf/WebKmeans)]([https://github.com/KostisGrf/WebKmeans](https://github.com/KostisGrf/WebKmeans)), accessed on 1 September 2023), while Python is used to code the modules of the first component. kClusterHub uses the k-means implementation, which is available in the scikit-learn library. Also, it uses the implementations of k-modes and k-prototypes which are available in Hammingkmodes library [32]. The Pandas [33] library is utilized for the datasets manipulation, and the kneed library [34] is used to obtain the number of clusters from the elbow graph. PHP is used for the development of the back-end, as well as the REST API. The composer library is used for the package management and PHPMailer for sending confirmation emails. A MySQL database is designed to manage users and their access levels (privileges). For the development of the front-end and the web interface, Javascript with the jQuery library, AJAX, and the Bootstrap framework are used. kClusterHub utilizes the server's file system to store the uploaded datasets. The REST API acts as the interface, where all the technologies can communicate with each other as shown in Figure 3.  
As presented in Figure 4, in kClusterHub, registered users can upload and select the dataset, choose the attributes that will be used in the clustering, and finally execute the partition-based clustering by utilizing the appropriate centroid initialization method. Partition-based clustering is carried out by k-means, k-modes and k-prototypes, depending on the data types of the dataset's attributes. The application offers an auto mode, which enables kClusterHub to analyze the attributes and automatically choose the appropriate clustering algorithm. Therefore, kClusterHub exhibits a keen understanding of the nature of the dataset's attributes. Furthermore, kClusterHub utilizes the k-means++ initialization  
Figure 3: Application architecture. method, when the clustering applied on numerical data, and the Cao initialization method, when clustering is applied on categorical or mixed data. Optimally, kClusterHub displays the \"elbow diagram\" and recommends the optimal number of clusters. The auto mode for automatic algorithm selection, as well as the automatic suggestion of the k parameter, through the elbow method, constitute the AutoML capabilities, and both enhance the intelligent decision making in the clustering process. The result of the clustering task is the cluster assignment of each instance in an exploratory plot and a tabular form. The elbow graph, the exploratory plot and the dataset with the assigned clusters can be downloaded for further use and processing. It is worth noting that the k-modes Python library is not as fast as the scikit-learn library. In practice, the elbow method requires running the clustering algorithm multiple times, equal to the maximum number of clusters defined by the user.