Skip to contents

Function to plot a silhouette plot

Usage

clara_silhouette(
  x,
  data,
  metric = "euclidean",
  silhouette_subsample = FALSE,
  scale_sil = TRUE,
  silhouette_table = TRUE,
  membership_threshold = 0
)

Arguments

x

An object of class "fuzzyclara"

data

data.frame or matrix used for clustering

metric

A character specifying a predefined dissimilarity metric (like "euclidean" or "manhattan") or a self-defined dissimilarity function. Defaults to "euclidean". Irrelevant if silhouette_subsample is TRUE.

silhouette_subsample

Use the subsample from 'x' for silhouette plot instead of all samples? Defaults to FALSE.

scale_sil

Scale numeric variables for silhouette plot? Defaults to TRUE. Irrelevant if silhouette_subsample is TRUE.

silhouette_table

Should a table of silhouette results be returned together with the plot? Defaults to TRUE.

membership_threshold

Threshold for fuzzy clustering observations to be plotted. Must be a number between 0 and 1. Defaults to 0.

Value

silhouette plot