compute_metric {visxhclust} | R Documentation |
Compute an internal evaluation metric for clustered data
Description
Metric will be computed from 2 to max_k clusters. Note that the row number in results will be different from k.
Usage
compute_metric(dmat, clusters, metric_name, max_k = 14)
Arguments
dmat |
distance matrix output of |
clusters |
output of |
metric_name |
"silhouette" or "dunn" |
max_k |
maximum number of clusters to cut using |
Value
a data frame with columns k
and score
Examples
data_to_cluster <- iris[c("Petal.Length", "Sepal.Length")]
dmat <- compute_dmat(data_to_cluster, "euclidean", TRUE)
clusters <- compute_clusters(dmat, "complete")
compute_metric(dmat, clusters, "dunn")
[Package visxhclust version 1.1.0 Index]