find_Kmeans_best_k {KMEANS.KNN}R Documentation

find_Kmeans_best_k

Description

find_Kmeans_best_k

Usage

find_Kmeans_best_k(data, max_k = 10, Method = "coude", verbose = FALSE)

Arguments

data

The dataset for which K-means clustering will be performed.

max_k

The maximum number of clusters to consider. It defaults to 10.

Method

The method used to determine the optimal number of clusters. Acceptable values are "coude" (elbow method), "silhouette" (silhouette method), or "gap" (gap statistics).

verbose

Logical. If TRUE, additional output is provided.

Value

This function does not return a value but prints the optimal number of clusters based on the chosen method and plots the corresponding graph.

Examples

data(iris)
find_Kmeans_best_k(iris[,-5],9,Method = "coude")

[Package KMEANS.KNN version 0.1.0 Index]