Quantifying Class Boundaries and Cluster Quality
Learn center distances, outlier measures, and robust metrics
Master optimal projection for maximum class separation
Understand scatter matrices and Fisher discriminant ratios
Discover how separation behaves in high-dimensional spaces
Separation measures how well we can distinguish between different classes or clusters in our data. Good separation means classes are far apart and tightly grouped internally.
The simplest separation measure: Calculate distances between class centers and compare to within-class spreads.
$$d = ||\mu_1 - \mu_2||_2$$
Simple, assumes spherical clusters
$$d = \sqrt{(\mu_1 - \mu_2)^T \Sigma^{-1} (\mu_1 - \mu_2)}$$
Accounts for covariance structure
Outliers can drastically affect separation measures. Robust methods focus on typical points rather than extremes.
$$\text{Robust Distance} = ||\text{median}_1 - \text{median}_2||$$
Use trimmed means or medians instead of full means
LDA finds the optimal linear projection that maximizes separation between classes. It's the gold standard for measuring linear separability.
$$J(w) = \frac{w^T S_B w}{w^T S_W w}$$
Maximize between-class scatter $S_B$, minimize within-class scatter $S_W$
$$S_B = \sum_{i=1}^{c} N_i (\mu_i - \mu)(\mu_i - \mu)^T$$
$$S_W = \sum_{i=1}^{c} \sum_{x \in C_i} (x - \mu_i)(x - \mu_i)^T$$
$$w^* = S_W^{-1}(\mu_1 - \mu_2)$$
$$F = \frac{(\mu_1 - \mu_2)^2}{\sigma_1^2 + \sigma_2^2}$$
Ratio of between-class to within-class variance
$$s = \frac{b - a}{\max(a, b)}$$
Compares within-cluster to nearest-cluster distance
$$DB = \frac{1}{n} \sum_{i=1}^{n} \max_{j \neq i} \frac{\sigma_i + \sigma_j}{d(c_i, c_j)}$$
Lower values indicate better separation
Warning: Separation behaves very differently in high dimensions. Many intuitive measures break down completely.
Separation measurement is both fundamental and nuanced. The right approach depends on your data's characteristics, dimensions, and intended use.