## 3 Materials and Methods
### K-Means Clustering  
Cluster analysis employs a measure of similarity or dissimilarity for assigning points in space to a cluster [62]. K-means clustering is the most popular unsupervised clustering technique for partitioning a given dataset into a set of \(k\)-groups (clusters). It is an iterative optimization method based on the initial division of objects into k-clusters. The distribution is based on the determination of the k-centroids that form the center of the clusters. The distance of each object to the centroids is then examined based on the Euclidean distance. The object is then assigned to the nearest centroid. A new centroid is then calculated for each cluster as an \(m\)-dimensional vector of the average values of each variable. The cycle is then repeated by calculating distances and assigning objects to these clusters. The process is performed as long as the objects are moved between the clusters [63]. The purpose of cluster analysis was to discover a system for categorizing and grouping the enterprises based on correlation obtained by evaluating factor variables. The enterprises with high positive correlation were grouped and separated by negative correlators. Cluster analysis calculationswere performed by software R, using the following packages: ggplot2 [64], factoextra [65] and cluster [66], rgl [67], scatterplot3d [68], gridExtra [69], and dplyr [70]. K-means algorithm can be summarized as follows [71]:  
1. Specify the number of clusters (\(k\)) based on the Elbow method (graphical form) and Average Silhouette method (Equation (1)). Silhouette coefficient (SC) finds the average distance to the best-fitting cluster, compared to the average distance between a data point, \(x\)\(\in\)\(C_{k}\), and other points of \(C_{k}\), for determining cluster system appropriateness [62]: \[SC\ =\ \frac{1}{N}\sum\
olimits_{i\ =\ 1}^{N}\frac{b(x)-a(x)}{max\{a(x),b(x)\}},\] (1) where \(x_{i}\) is a data object belonging to the cluster \(C_{k}\), \(a(x)\) is cohesion (average distance of \(x\) to all other vectors in the same cluster), and \(b(x)\) is separation (average distance of \(x\) to the vectors in other clusters). A value of +1 indicates a perfect clustering choice, and a value below 0 indicates a bad clustering choice. We try to find the minimum among the clusters. 2. Initialize Cluster Centroids by randomly selecting \(k\)-objects from the dataset as the initial cluster centers or means. 3. Form \(k\)-clusters by assigning each object (\(x_{i}\)) to its closest centroid, based on the Euclidean distance (Equation (2)) between the object and the centroid [72]: \[W(C_{k})\ =\ \sum\
olimits_{x_{i}\in C_{k}}(x_{i}-\mu_{k})^{2},\] (2) where \(x_{i}\) is a data object belonging to the cluster \(C_{k}\), and \(\mu_{k}\) is the mean value of the objects assigned to the cluster \(C_{k}\). 4. Re-compute the centroid of each cluster. For each of the k-clusters, update the cluster centroid by calculating the new mean values of all the data points in the cluster. 5. Repeat Steps 3 and 4, until the cluster assignments stop changing or the maximum number of iterations (usually 10) is reached. Iteratively minimize the total within sum of square (Equation (3)) of the objects to their assigned cluster centers (\(\mu_{k}\)). Total within sum of square is defined as follows [72]: \[\sum\
olimits_{k\ =\ 1}^{k}W(C_{k})\ =\ \prod\
olimits_{k\ =\ 1}^{k}\sum \
olimits_{x_{i}\in C_{k}}(x_{i}-\mu_{k})^{2},\] (3) The smaller the value \(W(C_{k})\), the better the clustering (\(C_{k}\), \(x_{i}\)). Although, finding an optimal pair (\(C_{k}\), \(x_{i}\)) is quite a computationally intensive task; finding either optimal S or optimal c is fairly easy. 6. Clusters validation consists of measuring the goodness of clustering results, using one-way Analysis Of Variance (ANOVA test). The ANOVA F-test evaluates if there are any differences between group means of clusters.