Skip to content

Fix macro average calculation in geometric_mean_score for binary classification#1164

Open
shubhrai23 wants to merge 2 commits intoscikit-learn-contrib:masterfrom
shubhrai23:fix-geometric-mean-binary
Open

Fix macro average calculation in geometric_mean_score for binary classification#1164
shubhrai23 wants to merge 2 commits intoscikit-learn-contrib:masterfrom
shubhrai23:fix-geometric-mean-binary

Conversation

@shubhrai23
Copy link

Geometric_mean_score with average='macro' was incorrect for binary classification (it was calculating the arithmetic mean of scores instead of the geometric mean of sensitivity and specificity).

Added a check to handle binary cases correctly while preserving multiclass behavior.

Added a regression test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments