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

Accuracy doesn't work for simple binary classifier #4456

Open
Richardjmorton opened this issue Dec 19, 2024 · 1 comment
Open

Accuracy doesn't work for simple binary classifier #4456

Richardjmorton opened this issue Dec 19, 2024 · 1 comment
Labels
Priority: P2 - no schedule Best effort response and resolution. We have no plan to work on this at the moment. Status: pull requests welcome We agree with the direction proposed, feel free to give it a shot and file a pull request

Comments

@Richardjmorton
Copy link

Hello,

This is quite a simple issue but the function nnx.metric.Accuracy only works for a network that returns more than one output, i.e.
super().update(values=(logits.argmax(axis=-1) == labels)). Not sure if this is by design.

I was playing around with a simple binary classifier than only returned a single logit per observation. The Accuracy function gives nonsense for this case.

Anyway, might be worth noting in the doc string what the function expects.

@cgarciae
Copy link
Collaborator

Yeah I think current implementation is for multi class. We could add support for binary classification.

@cgarciae cgarciae added Priority: P2 - no schedule Best effort response and resolution. We have no plan to work on this at the moment. Status: pull requests welcome We agree with the direction proposed, feel free to give it a shot and file a pull request labels Jan 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: P2 - no schedule Best effort response and resolution. We have no plan to work on this at the moment. Status: pull requests welcome We agree with the direction proposed, feel free to give it a shot and file a pull request
Projects
None yet
Development

No branches or pull requests

2 participants