Unexpected results when using ConfusionMatrixMetric #5966
-
Hello guys, I'm having problems to properly compute some metrics using the Monai's ConfusionMatrixMetric class. Any ideas on what's wrong? Thanks in advance |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
Hi @hblanco2009, if you only want to calculate the second channel, you should set
Hope it can help you, thx! |
Beta Was this translation helpful? Give feedback.
-
Hi @hblanco2009 , |
Beta Was this translation helpful? Give feedback.
-
Hi, @KumoLiu @yiheng-wang-nv , Since, in some scenarios, we are interested in having the confusion matrix metrics for multiple classes (i.e., not only the positive class), what would be a way to simulate the behavior of the classification report from scikit learn in MONAI? For example, how can we calculate the macro average of each metric of the confusion matrix for the two classes in the example provided by the original poster? The aim would be to obtain the same information shown in the last cell of one of your tutorials. Thanks! |
Beta Was this translation helpful? Give feedback.
Hi @hblanco2009 ,
The default setting for the class is that it will consider all classes, in your case the number is 2. If only count class 1, you need to set
include_background=False
.