Silhouette coefficient
The silhouette coefficient measures how well a sample fits its assigned cluster compared with the nearest alternative cluster, typically ranging from -1 to 1.
Statistics Slam Dunk
A silhouette coefficient measures an observation's relative cohesion within its assigned cluster and separation from the nearest other cluster, typically ranging from -1 to +1.
- How it is used
- Selects an appropriate number of clusters when the elbow plot is subjective or lacks a clear bend.
- How deep it goes
- Defines and derives the coefficient from dissimilarities, then uses plotted values to choose K without discussing implementation internals.
- Examples
- Evaluates NBA team clusters formed from standardized payroll and regular-season wins.
- What you can do after
- Apply it via factoextra's fviz_nbclust() to compare candidate cluster counts in R.
Read how Statistics Slam Dunk explains silhouette coefficient →
Cyber Threat Hunting
The silhouette coefficient is a clustering metric that compares an observation's cohesion within its assigned cluster with its separation from neighboring clusters, ranging from -1 to 1.
- How it is used
- Uses cohesion and separation to choose or validate k in k-means clustering.
- How deep it goes
- Defines per-point distances, gives the formula and range, and explains computational cost without deriving distance implementation.
- Examples
- Demonstrates k ranges 2–10 and 2–12 with plots, timing comparisons, and a k = 10 cluster-size countplot.
- What you can do after
- Evaluate candidate cluster counts with KElbowVisualizer and compare silhouette analysis against the elbow method.
Read how Cyber Threat Hunting explains silhouette coefficient →
Related concepts
- elbow methodalternative to · The elbow method is a heuristic for selecting model complexity or a parameter value by locating where increasing it yields diminishing improvement in an evaluation criterion.
- intra-cluster distanceuses · Intra-cluster distance is a measure of dissimilarity among observations within the same cluster or between them and a representative point.
- clusteringmeasures · Clustering is the technique of grouping data items according to similarity or shared characteristics.
- metrickind of · A metric is a quantitative measure used to characterize or assess a property, condition, behavior, performance, or outcome.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

