get_sil_widths: Get the silhouette widths

get_sil_widthsR Documentation

Get the silhouette widths

Description

This function extracts or calculates the silhouette widths from the clustering objects

Usage

get_sil_widths(obj, diss_matrix)

Arguments

obj

A clustering object

diss_matrix

A dissimilarity matrix, of class 'dist'

Details

cluster::pam retains a table of sil widths in obj$silinfo$widths For the other cluster methods we calculate them ourselves using cluster::silhouette

The clustering 'obj' must have a named 'cluster' vector. Named with the observation .rowid and the value the observation cluster membership

Value

A tibble with the observation .rowid, the cluster membership, the cluster neighbor and the silhouette width


lefkiospaikousis/ClusterAnalysis documentation built on July 18, 2022, 1:55 p.m.