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

cap_pos and cap_neg #5

Open
berkuva opened this issue May 15, 2022 · 0 comments
Open

cap_pos and cap_neg #5

berkuva opened this issue May 15, 2022 · 0 comments

Comments

@berkuva
Copy link

berkuva commented May 15, 2022

When working with imbalanced data, it may be possible that a batch of the training data may not have a positive or negative sample (depending on in which way the imbalance is). That causes cap_pos or cap_neg to become 0, and epoch_pos or epoch_neg can't be calculated. Would it be reasonable to do something like to following?

cap_pos = max(1, epoch_pos.shape[0])
cap_neg = max(1, epoch_neg.shape[0])
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