Jump to content

Connect Leeroopedia MCP: Equip your AI agents to search best practices, build plans, verify code, diagnose failures, and look up hyperparameter defaults.

Principle:Scikit learn contrib Imbalanced learn Geometric Mean Evaluation

From Leeroopedia


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: G-mean=sensitivity×specificity

For multi-class: G-mean=(i=1csensitivityi)1/c

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

G-mean=(i=1cTPiTPi+FNi)1/c

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.

Related Pages

Implemented By

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment