-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Description
First of all thank you for this great package!
From what I recon G-mean can be easily used as a multi-class evaluation measure - it is simply the geometric mean of class-wise recalls. Therefore, for binary problems:
G-mean = sqrt(TP/P * TN/N)
or using a different notation
G-mean = (class1_correct/class1 * class2_correct/class2)**(1/2.)
For 3-class problems:
G-mean = (class1_correct/class1 * class2_correct/class2, * class3_correct/class3)**(1/3.)
and so on changing the root/power to 1/4., 1/5., ...
There is no need for micro or macro recalls, in fact they diminish the value of G-mean, which is innately a multi-class measure (rare thing in imbalanced learning).
Sidenote:
One thing you probably know is that G-mean can very easily turn to zero - if one class is completely unrecognized the entire evaluation comes down to zero. With problems involving hundreds of classess thats not a nice thing. Therefore, sometimes people make a "correction" and one class is completely unrecognized instead of multiplying by zero they multiply by some (parmaterized) small value, e.g. 0.001.