library(CrossClustering)
clusters <- iris[-5] |>
dist() |>
hclust(method = 'ward.D') |>
cutree(k = 3)
ground_truth <- iris[[5]] |>
as.numeric()
cc_test_ari_permutation(ground_truth, clusters)
Run the code above in your browser using DataLab