Principle:Scikit learn contrib Imbalanced learn Geometric Mean Evaluation
| Knowledge Sources | |
|---|---|
| Domains | Machine_Learning, Model_Evaluation, Imbalanced_Learning |
| Last Updated | 2026-02-09 03:00 GMT |
Overview
A classification evaluation metric that computes the geometric mean of per-class sensitivities, penalizing classifiers that sacrifice minority class accuracy for overall accuracy.
Description
The Geometric Mean (G-mean) is specifically designed for evaluating classifiers on imbalanced datasets. Standard accuracy can be misleading when classes are imbalanced (a trivial majority-class predictor achieves high accuracy). G-mean instead computes the geometric mean of sensitivity (recall) across all classes, ensuring that high performance requires good recognition of every class, not just the majority.
For binary classification:
For multi-class:
A key property: if any class has zero sensitivity (completely unrecognized), G-mean drops to zero.
Usage
Use this metric when evaluating classifiers trained on imbalanced datasets. It is the standard evaluation metric in imbalanced learning research and should be preferred over standard accuracy.
Theoretical Basis
Where c is the number of classes, TP_i is true positives for class i, and FN_i is false negatives for class i.
The correction parameter allows substituting a small value for zero sensitivity to avoid the entire metric collapsing to zero when one rare class is missed.