# Error rate of a class from confusion matrix

My professor gives a multiclass confusion matrix and asks for the error rate of a certain class. Unfortunately, the professor refuses to give a definition.

I think the closest value to an error rate for a class $$j$$ is the conditional probability $$\mathrm{P}(\mathrm{Pred} \neq j ~|~ \mathrm{Truth} = j)$$, i.e. the sum of the offdiagonal entries along the $$j$$-column divided by the sum of all the $$j$$-column entries. Do you agree?

(I guess the only alternative would be $$\mathrm{P}(\mathrm{Truth} \neq j ~|~ \mathrm{Pred} = j)$$, which is computed along the $$j$$-row.)

I don't know if this is the definition that you're supposed to use, but usually in multiclass classification the most standard method to apply a binary classification measure is one-vs-rest: given a target class $$C$$ (positive class), consider all the other classes as a single negative class (i.e. as if they are all merged together).
According to this interpretation, the error rate of a target class $$j$$ would be the probability of an instance to have different predicted and true class, excluding cases where neither the predicted or true class is $$j$$ (these are not counted as errors since both the predicted and true class are "negative"),
• Many thanks, @Erwan! Correct me if I am wrong: this is then the sum of all the entries along the $j$-row and $j$-column, excluding the diagonal entry, divided by the sum of the $j$-row and $j$-column, including the diagonal entry? Commented Jun 14, 2022 at 16:37