Skip to contents

Calculate silhouette score

Usage

calculate_silhouette_score(predicted, data_frame, precomputed_dist = NULL)

Arguments

predicted

Cluster assignments

data_frame

Data frame containing the data

precomputed_dist

Optional precomputed distance matrix (output of dist). If NULL (default), the distance matrix is computed from data_frame.

Value

A list containing the average silhouette score and the average silhouette score for each cluster.