2
$\begingroup$

Assume a feature $x \in [a,b]$ and two classes $\omega_1, \omega_2$ with prior probabilities $P(\omega_1), P(\omega_2)$ and likelihood functions $p(x | \omega_1), p(x | \omega_2)$. Then, the expected classification error is defined as:

$$ P_e = \int\limits_{R_2}P(\omega_1)p(x|\omega_1)dx + \int\limits_{R_1}P(\omega_2)p(x|\omega_2)dx $$

where $R_1, R_2$ are the decision regions for classes $\omega_1, \omega_2$ respectively.

Now, my question is about the multiclass variant with $n$ classes. How will we proceed to calculate the expected classification error?

My approach would be to calculate $P_e$ as shown above for every possible pair of classes and then divide it by the number of classes (mean). That'll be:

$$ P_{e_{(mult)}} = \left(\sum \int\limits_{R_j}P(\omega_i)p(x|\omega_i)dx + \int\limits_{R_i}P(\omega_j)p(x|\omega_j)dx\right) / n, \quad i \neq j $$

Is this approach accurate when it comes to the expected classification error in the multiclass case?

$\endgroup$

1 Answer 1

1
$\begingroup$

The regions in first equation are in fact $\mathcal R-\mathcal R_1$ and $\mathcal R-\mathcal R_2$ respectively. In each integral we're calculating the probability of having a sample from class $k$ in the region $\mathcal R-\mathcal R_k$. For the multivariate case, you'll do this for each class, i.e. $$P_e=\sum_{k=1}^n \int_{\mathcal R-\mathcal R_k}P(w_k)p(x|w_k)dx$$

In your pairwise methodology, for each class $k$, all integrals are being calculated twice, so you'll divide by $2$ not $n$. It's equivalent to the above formula because $$\int_{\mathcal R-\mathcal R_k} P(w_k)p(x|w_k)dx=\sum_{j\neq k}\int_{\mathcal R_j}P(w_k)p(x|w_k)dx$$ considering $\mathcal R=\mathcal R_1\cup \mathcal R_2 \dots \mathcal R_n$.

$\endgroup$
2
  • $\begingroup$ Applying this formula to three classes $\omega_i, \, i = 1,2,3$ with $P(\omega_i) \cdot p(x | \omega_i)$ as functions of $x$: imgur.com/61hE484 , got an error of $0.411$. Does this result mean that these classes are very hard to seperate? $\endgroup$
    – Paris
    Commented Oct 29, 2020 at 10:04
  • 1
    $\begingroup$ That'd be a subjective remark, but yes. $\endgroup$
    – gunes
    Commented Oct 29, 2020 at 11:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.