title: Alternative to optim confusion matrix for multi label classification in torch
body: <p>I have a convnet that produces multi label output. Ie: each image can be labelled with 0 to 10 labels. The output is a tensor of size 10, containing 1s (indicating a label at that index) and -1s (no label at that index). Targets are in the same format. So:</p>
  
  <pre><code>{1, 1, 1, -1, 1, 1, 1, 1, 1, 1}
  </code></pre>
  
  <p>Indicates labels 1-3 and 5-10. Multi label output cannot be used with the confusion matrix of the torch optim package. What are some good alternatives for evaluating prediction accuracy? </p>
  
  <p>Ideally, I would like to know how accurately <strong>each label</strong> is being predicted, in terms of false positives, true positives, etc. One idea would be to make 10 separate confusion matrices and feed each the data for one index. Is there a better solution though?</p>
  
  <p>Any input appreciated. </p>
  
  <hr>
  
  <p>Update: the above approach worked fine, but it's cumbersome when there are many labels. I just wondered if there was a better way. </p>