Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
geometric_mean_score inside classification_report_imbalanced is wrong? #394
I was getting different reported values for geometric mean score when using the geometric_mean_score and was curious why. Looks like there are a few mixed up parameters in classification_report_imbalanced.
geometric_mean_score wants y_true before y_pred:
However, inside classification_report_imbalanced:
So to for index balanced geometric mean:
On average, the results are quite different:
After changing param order I was able to get consistent results
Edit: Seems like the parameter order miss match is not the main issue to why I'm getting inconsistent results (was not able reproduce the same problem in isolation). I'll report back when I know more. Thanks!
Wait! This might confirm that the order of y_truth and y_pred has to be correct:
Oh I see thanks for reporting. You are right, those 2 lines need to be exchanged:
Do you wish to make a PR to solve the issue.