Description Usage Arguments Value Examples
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.
1 | 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.
1 2 3 | X <- array(c(c(0, 1, 10, 10, 10, 10), c(0, 1, 10, 11, 0, 1)), dim = c(6,2))
X_scaled <- preprocess(X)
optimal_K <- find_elbow(X_scaled)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.