fast.sil: Calculating Silhouette on Linear Data Clusters
Description
A fast linear-time algorithm to calculate silhouette information on
one-dimensional data with cluster labels.
Usage
fast.sil(x, cluster)
Arguments
x
a numeric vector of one-dimensional points
cluster
an integer vector of cluster labels for each point
Value
The function returns a numeric value of the average
silhouette information calculated on the input data clusters.
Details
The silhouette information on one-dimensional data is
calculated in linear time here, instead of quadratic time by
definition. There is an overhead of sorting \(O(n \log n)\) if the
input data are not sorted.