# AutoElbow: An Automatic Elbow Detection Method for Estimating the Number of Clusters in a Dataset
## 4 Results and Discussion
### Three-Cluster Dataset  
Figure 3a depicts a 2D representation of the Iris dataset based on the petal width and petal length. This dataset consists of three ideal (i.e., groundtruth) clusters (i.e., the Iris Setosa, Iris Versicolour, and Iris Virginia species). Nevertheless, without prior knowledge of these clusters, it is common to consider the dataset as containing either two clusters (with the Setosa and Virginia species constituting one cluster) or four clusters (i.e., the Iris Setosa and Iris Versicolour as separate clusters, whereas the Iris Virginia as comprising two clusters). Consequently, the automation of this subjective process should result in some errors. However, these errors must fall within reasonable bounds, which we consider for the Iris dataset as between two and four clusters.  
Figure 3b,c shows the corresponding elbow-based graphs for \(K=10\) and \(K=40\), respectively. By comparing the two graphs, it is clear that the elbow in Figure 3b is more pronounced than the smoother and longer-tailed graph in Figure 3c. Such variations in the structure of these elbow graphs are deemed useful in evaluating the performance of the various approaches even for the same dataset. As a result, Figure 3b-i shows the corresponding performance graphs for both \(K=10\) and \(K=40\) for the various approaches.  
Figure 3d depicts the results of the KPA method. Typically, the KPA method computes an error (i.e., the RMSE) between two best lines that fit the graph, and the minimum value over a range of \(k\) is considered the optimal \(k^{*}\) value. In this case, the KPA returns the same value (i.e., \(k^{*}=2\)) for the \(K=10\) and \(K=40\) graphs. Although this may appear appropriate for the small cluster Iris dataset, visual analysis shows that the elbow point in Figure 3c shifted slightly due to the longer tail effect of the graph.  
Despite missing this shift, the KPA's performance falls within the expected bounds, and it is, thus, deemed adequate. A similar argument to the KPA can be made for the ESA and L-methods as can be seen from their results depicted in Figure 3e,h, respectively. This is due to the fact that both the KPA and the L-method utilize two best lines of fit for the elbow graph.  
Figure 3f,g,i, on the other hand, show that the ADM, Kneedle, and the proposed AutoElbow methods were able to detect the actual cluster number as \(k^{*}=3\) for \(K=10\). For \(K=40\), the proposed AutoElbow and Kneedle methods also demonstrated a shift in the detected elbow point (i.e., \(k^{*}=4\)), which is expected due to the long tail effect of the graph. However, for \(K=40\), the ADM detected a lower elbow point (i.e., \(k^{*}=2\)), demonstrating that the method may not necessarily adapt to the graph length and elbow position but rather to variations along the curve.  
the For instance, because the \(K=40\) graph was more circularly curved and smoother than anticipated, the ADM and ESA approaches did not adjust as expected, because the ADM method seeks to detect graph points with acute angles, which was absent in this case at the ideal elbow point (i.e., \(k^{*}=3\)). It can, thus, be concluded that the proposed method and other competing methods typically performed well for datasets with small clusters and for smaller \(K\) values used to generate the elbow graph (e.g., \(K=10\)). However, this may  
Figure 3: Small cluster number case study: three clusters.  
not always be the case, and the consequences of other potential conditions are discussed in the following subsections.