Hi DimpleM
Thank you for reaching out to Microsoft Q&A forum!
I understand that you would like to understand how the True Negative (TN__)__ value for Class 0 was derived as 5 instead of 4.
The confusion matrix represents the actual vs. predicted values:
Actual \ Predicted (y^\hat{y}y^) | 0 | 1 | 2 |
---|---|---|---|
Actual \ Predicted (y^\hat{y}y^) | 0 | 1 | 2 |
0 (Actual 0) | 2 | 0 | 0 |
1 (Actual 1) | 0 | 2 | 0 |
2 (Actual 2) | 0 | 1 | 2 |
TN Calculation for Class 0:
- True Negatives (TN) for Class 0 are the cases where the actual class is not 0 (i.e., the actual class is either 1 or 2), and the predicted class is also not 0 (i.e., predicted as 1 or 2).
- To compute TN for Class 0, we exclude:
Row 0 (actual class 0)
Column 0 (predicted class 0)
Extracting relevant values from the confusion matrix:
Actual \ Predicted (y^\hat{y}y^) | 1 | 2 |
---|---|---|
1 (Actual 1) | 2 | 0 |
1 (Actual 1) | 2 | 0 |
2 (Actual 2) | 1 | 2 |
The values contributing to TN for Class 0 are: 2, 0, 1, 2
Total TN for Class 0 = 2 + 0 + 1 + 2 = 5
Thus, TN for Class 0 is correctly calculated as 5 instead of 4.
Hope this helps. Do let us know if you any further queries.
-------------
If this answers your query, do click Accept Answer
and Yes
for was this answer helpful.
Thank you.