View source: R/cluster_factory.R
compute_tightness | R Documentation |
Compute dispersion of a single cluster
compute_tightness(dists, cluster)
dists |
A distance matrix for points in the cluster. |
cluster |
A list containing named vectors, whose names are data point names and whose values are cluster labels |
This method finds the medoid of the input data set and returns the average distance to the medoid, i.e.,
\tau(C) = \dfrac{1}{\left(|C|-1\right)}\displaystyle\sum_{i}\text{dist}(x_i, x_j)
where
x_j = \text{arg}\,\min\limits_{x_j\in C}\, \sum_{x_i \in C, i\neq j}\text{dist}(x_i, x_j)
A smaller value indicates a tighter cluster based on this metric.
A real number in [0,1]
representing the mean distance to the medoid of the cluster.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.