# How to compute G-mean score?

I would greatly appreciate if you could let me know how to fix the following issue:

I used sklearn.metrics.fowlkes_mallows_score to compute G-mean score for my binary classification problem, but it produces nan:

AUC: 0.960674
Accuracy: 0.949137
Cohen Kappa: 0.484456
F_measure: 0.508772
G-mean: 0.833217
G-mean1: nan
Matthews: CorrCoef 0.510088
Precision: 0.391892
Recall: 0.725


However, it should be: 0.533031

• Is it possible to put your data? Aug 21 '18 at 13:21
• @Media sorry, I can not put my data because it is not too small. However, this issue is also reported here: github.com/scikit-learn/scikit-learn/issues/8101 but I couldn't understand how to fix it. Thanks Aug 21 '18 at 13:29
• Have you tried to update it? Aug 21 '18 at 14:13
• @Media sorry I installed the latest version of scikit using anaconda. However, unfortunately the problem is not solved. Aug 22 '18 at 5:38
• I guess the issue may still be remained. Aug 24 '18 at 13:29

from imblearn.metrics import geometric_mean_score

The primary issue is that fowlkes_mallows_score is designed to evaluate clustering and you are trying to apply it to evaluate binary classification.