question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Required input to confusion matrix

See original GitHub issue

I understand that the input to the confusion matrix metric has to be in the shape of

batch_size x num_classes, e.g. for a binary classification problem

Sample 1:     0.75 0.25
Sample 2:     0.35 0.65

Also the target is to expected to be of int type rather than float due to the use of torch.bincount.

I am wondering, if it would make sense to change the API so that input of the shape batch_size suffices, i.e.

Sample 1:     1
Sample 2:     0

Also a more consistent metric handling would be desirable because currently for some metrics like Accuracy the user has to manually round output before passing it to the metric whereas for others this is not necessary. I dont think its good to clutter ones entire code with output_transform closures for this purpose

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5

github_iconTop GitHub Comments

2reactions
CDitzelcommented, Feb 11, 2020

mh so my issue is literally based on my ignorance of the Ignite lib and the Deep Learning Matter as a whole, Embarrassing. Thank you Sir

0reactions
vfdev-5commented, Feb 11, 2020

No problems 😃 Feel free to close the issue if it answers your question. Thanks

Read more comments on GitHub >

github_iconTop Results From Across the Web

sklearn.metrics.confusion_matrix
Confusion matrix whose i-th row and j-th column entry indicates the number of samples with true label being i-th class and predicted label...
Read more >
What is a Confusion Matrix in Machine Learning
A confusion matrix is a summary of prediction results on a classification problem. The number of correct and incorrect predictions are ...
Read more >
Demystifying 'Confusion Matrix' Confusion | by SalRite
It is the 'Exactness', ability of the model to return only relevant instances. If your use case/problem statement involves minimizing the False ...
Read more >
Python Machine Learning - Confusion Matrix - W3Schools
True means that the values were accurately predicted, False means that there was an error or wrong prediction. Now that we have made...
Read more >
What Is a Confusion Matrix? (Plus How To Calculate One)
The matrix organizes input and output data in a way that allows analysts and programmers to visualize the accuracy, recall and precision of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found