Gap statistics
Version 1.4.0.0 (6.93 KB) by
Alessandro Crimi
Algorithm for cluster validity index, R. Tibshirani et al. 2001
Gap statistic is a method used to estimate the most possible number of clusters in a partition clustering, e.g. k-means clustering (but consider more robust clustering). This measurement was originated by Trevor Hastie, Robert Tibshirani, and Guenther Walther, all from Standford University.
I posted here since I haven't found any Gapstatistics implementation to validate my code, therefore feel free to report bugs and improvements.
Cite As
Alessandro Crimi (2026). Gap statistics (https://www.mathworks.com/matlabcentral/fileexchange/37905-gap-statistics), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Created with
R2012a
Compatible with any release
Platform Compatibility
Windows macOS LinuxCategories
Find more on Classification in Help Center and MATLAB Answers
Tags
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
