Reputation: 141
my classification system will produce 3 outputs telling the user what category of an image belongs to. The categories are let say A, B and C. Following are the example of the matrix:
A B C
A 10 5 2
B 0 20 2
C 0 0 20
I am a bit confuse with the formula Precision = tp/tp + fp and Recall = tp/tp+fn because I am not sure how can the true positive, true negative, false positive and false negative applied in this case.
Can anyone assist on this? Your help is greatly appreciated. Thank you.
Upvotes: 0
Views: 499
Reputation: 16104
You can process one category at a time.
For instance, you process A
first. Then your confusion matrix looks like below:
A Not A
A 10 7 = (5+2)
Not A 0 42 = (20+2+0+20)
So in this case,
# true positive = 10 (A->A)
# true negative = 42 (Not A->Not A)
# false negative = 7 (A->Not A)
# false positive = 0 (Not A->A)
The similar thing can be applied to category B
and C
.
Upvotes: 2