sort_silhouette function

Sort the silhouettes by group

Sort the silhouettes by group

Sorts the silhouettes, first by group, then by value, preparatory to plotting.

sort_silhouette(sil, cluster)

Arguments

  • sil: The nn-vector of silhouette values.
  • cluster: The nn-vector of cluster indices.

Returns

The nn-vector of sorted silhouettes.

Examples

# Uses sports data. data(sportsranks) # Obtain the K-means clustering for sports ranks. kms <- kmeans(sportsranks, centers = 5, nstart = 10) # Silhouettes sil <- silhouette.km(sportsranks, kms$centers) ssil <- sort_silhouette(sil, kms$cluster)

See Also

silhouette.km

  • Maintainer: James Balamuta
  • License: MIT + file LICENSE
  • Last published: 2020-10-31