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 get top-5 or top-3 accuracy by ConfusionMatrix? #140

Open
arashno opened this issue Oct 12, 2016 · 1 comment
Open

How to get top-5 or top-3 accuracy by ConfusionMatrix? #140

arashno opened this issue Oct 12, 2016 · 1 comment

Comments

@arashno
Copy link

arashno commented Oct 12, 2016

Hello all,
Can I use ConfusionMatrix to compute top-n accuracy for my classifier or not?
If yes, how can I do that? Is there any sample code to do that?
Thanks

@taineleau-zz
Copy link

taineleau-zz commented Oct 13, 2016

hi,

I think you need to hack the ConfusionMatrix.lua file if you want to get the top-k acc.

And there're two ways to calculate top-k acc., hope the following helps.

  1. please kindly check the resnet training script L107.
  2. Torchnet's utils for topk.

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

2 participants