Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

For multiclass, how to get the overall score? #13

Open
sarmientoj24 opened this issue Aug 25, 2022 · 5 comments
Open

For multiclass, how to get the overall score? #13

sarmientoj24 opened this issue Aug 25, 2022 · 5 comments
Assignees
Labels
question Further information is requested

Comments

@sarmientoj24
Copy link

Do I just average all of it?

@muellerdo
Copy link
Member

muellerdo commented Aug 25, 2022

Heyho @sarmientoj24,

the majority just macro-averages it (computing the score for each class individually and then just average it).
So in terms of miseval, you get the score for each class if you run the evaluate function with the multi_class parameter, and the you can just apply np.mean() from NumPy on the returned array.

For the evaluation biases in multi-class, check out the subchapter "Multi-class evaluation" in our recent paper in BMC Research Notes Towards a guideline for evaluation metrics in medical image segmentation: https://bmcresnotes.biomedcentral.com/articles/10.1186/s13104-022-06096-y

Also check out this interesting StackExchange post about Micro- vs Macro-Averaging: https://datascience.stackexchange.com/questions/15989/micro-average-vs-macro-average-performance-in-a-multiclass-classification-settin

Cheers,
Dominik

@muellerdo muellerdo added the question Further information is requested label Aug 25, 2022
@muellerdo muellerdo self-assigned this Aug 25, 2022
@sarmientoj24
Copy link
Author

how do i micro average here?

@muellerdo
Copy link
Member

@sarmientoj24, you have to put some more information to your questions 😄

@sarmientoj24
Copy link
Author

sorry for that. i was trying to ask how do I compute micro-averages instead of macro averages using the library to get the score?

@muellerdo
Copy link
Member

@sarmientoj24, MISeval does not provide functionality for automatic computing of averaged values. You can get the individual class scores from MISeval, but you have to do the averaging/weighting by yourself as you want. You can compute the class distribution per sample and then accordingly average the miseval returned scores with your weights.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants