# AutoElbow: An Automatic Elbow Detection Method for Estimating the Number of Clusters in a Dataset
## 4 Results and Discussion
### Seven-Cluster Dataset  
The various methods were tested on a synthetic dataset with seven clusters, as shown in Figure 4a. The dataset was deemed instructive because it included a mix of small and large, convex-shaped, and connected clusters. As a result, any clustering algorithm may be susceptible to subjective errors, which may be reflected in the apparent elbow position within the elbow-based graph. Consequently, we ran the K-means algorithm repeatedly for \(K=10\) and \(K=40\).  
We note that using \(K=10\) for a dataset with a groundtruth of seven clusters may obstruct the precise location of the true elbow because it will be close to the graph's edge. As a result, instead of an ideal sharp elbow, the graph may suffice as a curve, as shown in Figure 4b. This exemplifies why a large \(K\) value is frequently preferred, particularly in applications where the expected cluster number in the dataset is unknown. As a result, we attempted \(K=40\), which introduces the long-tail effect, as shown in Figure 4c and which may eventually influence the ideal elbow position.  
In addition, since it is well-known that the K-means algorithm performs better with spherical clusters and poorly with irregularly shaped clusters [9], we specified the error bound to be between six and eight clusters in this instance. This error bound was chosen because the K-means algorithm may estimate the convex-shaped cluster in the dataset as two separate clusters, whereas the connected clusters may be viewed as a single cluster.  
The KPA method detected its elbow point at \(k^{*}=3\) for \(K=10\) and \(k^{*}=4\) for \(K=40\), as shown in Figure 4d. In essence, the KPA, ESA, and L-method all estimated \(k^{*}\) values that were outside of the error bound for both \(K=10\) and \(K=40\), while the poor performance for \(K=10\) can be explained by the groundtruth's proximity to the graph edge (i.e., \(k^{*}=7\) being close to \(K=10\)); nevertheless, it is expected that when the tail was extended to \(K=40\), these algorithms would have adapted. However, this was not the case because both curves (i.e., for \(K=10\) and \(K=40\)) had a high curvature, thus, making the true estimate of the elbow point difficult for these methods.  
Although the ADM, Kneedle, and proposed AutoElbow method all underestimated the true \(k^{*}\) value as \(k^{*}=3\) for the \(K=10\) graph, as shown in Figure 4f,g,i; nevertheless, they all adapted appropriately when \(K\) was increased to \(K=40\). As a result, our proposed algorithm, along with the ADM and Kneedle methods, achieved an accuracy of \(k^{*}=6\), which was within the error bounds. These results are consistent with what a human observer might have estimated in the absence of prior knowledge of the true cluster number. By visually examining Figure 4a, for instance, an expert may localize the elbow point \(k^{*}\) to be between 4 and 6, thus, justifying the low \(k^{*}\) value estimated by the various algorithms for \(K=10\).  
To summarize, all of the algorithms failed to identify the correct cluster number, owing to the poor structure of the elbow graph, which was caused by the low iteration value used in this case. As a result, this experiment validates the need for large \(K\) iteration values to be used, for which our proposed algorithm performed well and within appropriate bounds.