Learn R Programming

daltoolbox (version 1.2.737)

clu_tune: Clustering Tune

Description

Creates an object for tuning clustering models. This object can be used to fit and optimize clustering algorithms by specifying hyperparameter ranges

Usage

clu_tune(base_model, folds = 10, ranges = NULL)

Value

returns a clu_tune object.

Arguments

base_model

base model for tuning

folds

number of folds for cross-validation

ranges

a list of hyperparameter ranges to explore

Examples

Run this code
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