Back to search

Cal Poly

Determining k Clusters in K-means Clustering with the CRAB Algorithm

Abstract

dc:description.abstract

Unsupervised clustering often faces the challenge of determining the correct number of clusters in the absence of a true target variable. Traditional methods such as the Elbow Method and the Silhouette Score can produce ambiguous results and rely on assumptions about cluster shape or separation. To address this, we created the Clustering Rivals and Buddies (CRAB) algorithm which evaluates clusters based on stability across multiple subsamples. CRAB uses pairwise classifications to identify points that consistently group together called “Buddies” and points that remain separated called “Rivals.” Applied with K-means, CRAB accurately recovers underlying cluster structures in both spherical and non-spherical datasets, even under varying sample sizes and variances. An accompanying R package implements CRAB with a tidy workflow and easy to follow syntax, making it accessible for research and educational use. By emphasizing stability, CRAB offers a robust alternative for selecting cluster numbers in datasets where traditional methods may fall short.

Degree

thesis:*
Name thesis:degree_name
MS in Statistics
Discipline thesis:degree_discipline
Statistics

Author and committee

dc:creator, dc:contributor.*
Author dc:creator
  • Cabrera, Jasmine Kristine S
Contributors dc:contributor
  • Kelly Bodwin
  • Statistics
  • College of Science and Mathematics

Subjects

dc:subject × 3

Identifiers

dc:identifier.*
Repository record dc:identifier
https://digitalcommons.calpoly.edu/theses/3329

Chain of custody

source
Harvested from
Cal Poly
Base URL
digitalcommons.calpoly.edu/do/oai/
Last updated
2026-11-19
Source record
OAI-PMH GetRecord
citation

Cabrera, Jasmine Kristine S. Determining k Clusters in K-means Clustering with the CRAB Algorithm. https://digitalcommons.calpoly.edu/theses/3329