Question: 4.9 (Confusion matrix) In a classification problem with K classes, the cost matrix is KK matrix C=[cij] in which cij is the cost when one
![cost matrix is KK matrix C=[cij] in which cij is the cost](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f5b0a4b42c9_57266f5b0a45102f.jpg)
4.9 (Confusion matrix) In a classification problem with K classes, the cost matrix is KK matrix C=[cij] in which cij is the cost when one example belongs to class i but is predicted to be in class j. Similarly, a confusion matrix is a KK matrix A=[aij], in which aij is the number of class i examples that are classified as belonging to class j. Let the confusion matrix be computed based on a test set with N examples. We often normalize the confusion matrix to obtain A^, by a^ij=aij/k=1Kaik. Hence, the sum of all elements in any row of A^ equals 1 . We call A^ the normalized confusion matrix. (a) Prove that the total cost for the test set equals tr(CTA). (b) In an imbalanced classification problem, do you prefer the confusion matrix or the normalized one? Why
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
