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
Returns
A real number in [0,1] representing a measure of dispersion of a cluster.
Details
This method computes a measure of cluster dispersion. It finds the medoid of the input data set and returns the average distance to the medoid. Formally, we say the tightness τ of a cluster C is given by
τ(C)=(∣C∣−1)1i∑dist(xi,xj)
where
xj=argxj∈Cminxi∈C,i=j∑dist(xi,xj)
A smaller value indicates a tighter cluster based on this metric.