This repository contains a modern implementation of a 2000 ICML paper X-means: Extending K-means with Efficient Estimation of the Number of Clusters.
For more derivation details, the notes written by Robert Hancock provide great insights on how Bayesian information criteria (BIC) are calculated under identical spherical normal distribution for each cluster. A version with correction is also attached in references
directory.
The current implementation also provides a more computationally intensive option to calculate BIC scores directly (through explicit log likelihood computation) without any distribution assumptions (e.g. identical spherical normal); as well as additional options to choose subclusters' centers manually by splitting parent cluster's center along the longest vector (or along a random vector as mentioned in the paper) from cluster's center in opposite directions, or to choose subclusters's centers using k-means++ initialization.