powered by
Tune clustering hyperparameters by evaluating an intrinsic metric over a parameter grid and selecting the elbow (max curvature).
clu_tune(base_model, folds = 10, ranges = NULL)
returns a clu_tune object.
clu_tune
base model for tuning
number of folds for cross-validation
a list of hyperparameter ranges to explore
Satopaa, V. et al. (2011). Finding a “Kneedle” in a Haystack.
data(iris) # fit model model <- clu_tune(cluster_kmeans(k = 0), ranges = list(k = 1:10)) model <- fit(model, iris[,1:4]) model$k
Run the code above in your browser using DataLab