3
$\begingroup$

imblearn is a python library for handling imbalanced data. A code for generating classification report is given below.

import numpy as np
from imblearn.metrics import classification_report_imbalanced
y_true = [0, 1, 2, 2, 2]
y_pred = [0, 0, 2, 2, 1] 
target_names = ['class 0', 'class 1', 'class 2'] 
print(classification_report_imbalanced(y_true, y_pred,target_names=target_names))

The output for this is as follow

                pre       rec       spe        f1       geo       iba       sup

 class 0       0.50      1.00      0.75      0.67      0.87      0.77         1
 class 1       0.00      0.00      0.75      0.00      0.00      0.00         1
 class 2       1.00      0.67      1.00      0.80      0.82      0.64         3

avg/total      0.70      0.60      0.90      0.61      0.66      0.54         5

What is the meaning of iba in this classification report. Here pre stands for precision, rec stands for recall, spe stands for specificity, f1 stands for f1 measure, and geo stands for geometric mean. All these are metrics for measuring performance of imbalanced classes.

$\endgroup$
1
$\begingroup$

If you look at the imblearn documentation for classification_report_imbalanced, you can see that iba stands for "index balanced accuracy". For more information on what the index balanced accuracy is and it's value in cases on imbalanced datasets, have a look at the original paper.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.