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

How to address class imbalance? #12

Open
chiragpr opened this issue Sep 5, 2022 · 0 comments
Open

How to address class imbalance? #12

chiragpr opened this issue Sep 5, 2022 · 0 comments

Comments

@chiragpr
Copy link

chiragpr commented Sep 5, 2022

I am using my custom dataset with 2 classes which has 10% samples with label 1 and 90% samples with label 0 in both source and target datasets. The accuracy is quite good, and is around 98+%!. But, calling accuracy 'precision' is incorrect as precision means (no. of samples in target classified as 1)/(no. of samples in target with ground truth 1).
But, how to find precision in this case? Which part of the code must be modified to find the following:

  1. sensitivity (precision) = (no. of samples in target classified as 1)/(no. of samples in target with ground truth 1).
  2. specificity = (no. of samples in target classified as 0)/(no. of samples in target with ground truth 0).

We promise to give you credit in our publication. Thank you

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

No branches or pull requests

1 participant