Skip to content

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

Open

Description

@arashno

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

Activity

  1. taineleau-zz commented on Oct 13, 2016

    @taineleau-zz

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions