View source: R/unsupervised-clustering.R
| tidy_clara | R Documentation |
Performs CLARA clustering (scalable version of PAM)
tidy_clara(data, k, metric = "euclidean", samples = 50, sampsize = NULL)
data |
A data frame or tibble |
k |
Number of clusters |
metric |
Distance metric (default: "euclidean") |
samples |
Number of samples to draw (default: 50) |
sampsize |
Sample size (default: min(n, 40 + 2*k)) |
A list of class "tidy_clara" containing clustering results
# CLARA for large datasets
large_data <- iris[rep(1:nrow(iris), 10), 1:4]
clara_result <- tidy_clara(large_data, k = 3, samples = 50)
print(clara_result)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.