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

pos_label is missing from AUROC #1376

Closed
zhiqiangdon opened this issue Dec 6, 2022 · 3 comments · Fixed by #1383
Closed

pos_label is missing from AUROC #1376

zhiqiangdon opened this issue Dec 6, 2022 · 3 comments · Fixed by #1383
Assignees
Labels
help wanted Extra attention is needed question Further information is requested

Comments

@zhiqiangdon
Copy link

🐛 Bug

The pos_label argument is missing from AUROC/BinaryAUROC after the recent cleanup: #1252

I guess this is a bug, but would like confirm with you.

To Reproduce

Steps to reproduce the behavior...

Code sample

Expected behavior

Environment

  • TorchMetrics version (and how you installed TM, e.g. conda, pip, build from source):
  • Python & PyTorch Version (e.g., 1.0):
  • Any other relevant information such as OS (e.g., Linux):

Additional context

@zhiqiangdon zhiqiangdon added bug / fix Something isn't working help wanted Extra attention is needed labels Dec 6, 2022
@github-actions
Copy link

github-actions bot commented Dec 6, 2022

Hi! thanks for your contribution!, great first issue!

@Borda Borda changed the title pos_label is missing from AUROC after code cleanup in PR 1252 pos_label is missing from AUROC Dec 7, 2022
@Borda Borda added question Further information is requested and removed bug / fix Something isn't working labels Dec 7, 2022
@SkafteNicki
Copy link
Member

Hi @zhiqiangdon, thanks for reporting this issue.
In this case it is not an error but instead an explicit design decision. We standardized all binary classification metrics to always require the target to be encoded as [0,1] where the positive class will then be the 1 class.
If you want the 0 class to be the positive class then feed targets as

BinaryAUROC()(preds, 1-target)

Sorry for the confusion. I created PR #1383 that will explicit mention that 1 is always considered the positive class.

@zhiqiangdon
Copy link
Author

Thanks @SkafteNicki! Clarifying this change in documents is super helpful!

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

Successfully merging a pull request may close this issue.

3 participants