Metrics#

The imblearn.metrics module includes score functions, performance metrics and pairwise metrics and distance computations.

Classification metrics#

See the Metrics section of the user guide for further details.

classification_report_imbalanced(y_true, ...)

Build a classification report based on metrics used with imbalanced dataset.

sensitivity_specificity_support(y_true, ...)

Compute sensitivity, specificity, and support for each class.

sensitivity_score(y_true, y_pred, *[, ...])

Compute the sensitivity.

specificity_score(y_true, y_pred, *[, ...])

Compute the specificity.

geometric_mean_score(y_true, y_pred, *[, ...])

Compute the geometric mean.

macro_averaged_mean_absolute_error(y_true, ...)

Compute Macro-Averaged MAE for imbalanced ordinal classification.

make_index_balanced_accuracy(*[, alpha, squared])

Balance any scoring function using the index balanced accuracy.

Pairwise metrics#

See the Pairwise metrics section of the user guide for further details.

Metrics to perform pairwise computation.

ValueDifferenceMetric(*[, n_categories, k, r])

Class implementing the Value Difference Metric.