This function calculates the total within-cluster sum of squares (WSS) for a range of cluster numbers and identifies the best number of clusters (k) based on the elbow method.
find_best_k_for_kmeans(dist_object, max_clusters = 10)
The optimal number of clusters (k) based on the elbow method.
A distance matrix or data frame containing the data to be clustered.
The maximum number of clusters to test for k-means. Default is 10.