Skip to content

Macro F1 Score calculation in your code. #3

@ashim95

Description

@ashim95

Hi @ChristophAlt ,

Thank you for the wonderful codebase.

I see that for reporting macro averaged F1 scores, you first calculate macro averaged precision, then calculate macro averaged recall, and then use f1_measure = 2.0 * ((precision * recall) / (precision + recall + 1e-13)) to calculate macro averaged F1 score (here).

In standard implementations of macro F-score (like in scikit-learn), macro averaged F1 score is calculated by first calculating F1 score for each class and then taking the average of these F1 scores.

You might want to mention this somewhere in your documentation, as it can cause some confusion.

Let me know what you think.

Thanks,
Ashim

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions