R/find_elbow.R
find_elbow.Rd
find_elbow This function takes in unlabeled, scaled data and performs clustering using the KMeans clustering algorithm values of K up to the min(10, n_samples - 1). It returns the value for K which maximizes the mean silhouette scores across all clusters.
find_elbow(X)
X | matrix: unlabeled data with appropriate preprocessing steps applied. |
---|
numeric: The optimal choice of K in the K-means algorithm according to silhouette score.