Consider a 2-class Pattern Recognition problem with feature vectors in $R^2$. The class conditional density for class-I is uniform over $[1, 3]×[1, 3]$ and that for class-II is uniform over $[2, 4] × [2, 4]$.

Now I have two questions.

  1. Suppose the prior probabilities are equal. In such a case, the Bayes classifier is given by $x + y = 5$.
  2. If the prior probabilities are changed to $p1 = 0.4$ and $p2 = 0.6$, what is the Bayes classifier now?

I solved the first part kinda "graphically" and intuitively, but I don't know how to solve the second one. Any help, hint or a solution, will be appreciated. Thanks!


1 Answer 1


"Analytically" you can proceed using Bayes theorem .

Using graphical intuition , note that the non-uniform priors "favor" a class over the other , so the points at the intersection have now a higher probability to belong to the second class .

  • $\begingroup$ Can you please provide some steps for obtaining the result analytically? $\endgroup$ Commented Feb 7, 2019 at 8:14
  • $\begingroup$ Express the conditional probability using Bayes theorem as $p(y=1|x) \sim p(x|y=1)p(y=1) $ and $p(y=2|x) \sim p(x|y=2)p(y=2) $ . To find the Bays classifier , think about the points that separates the region in the plane where the first quantity is greater the the second one . $\endgroup$ Commented Feb 7, 2019 at 8:22
  • $\begingroup$ I don't understand how I'm supposed to "think about the points that separates the region in the plane...". Like even if I am somehow able to do it in this one, what if my input space is how high dimension, say 10? $\endgroup$ Commented Feb 7, 2019 at 8:27
  • $\begingroup$ Well , usually finding Bays classifier it not feasible . In this toy example it's easy because all your points are located in one of the two rectangles and computing the class probability for each one is easy . $\endgroup$ Commented Feb 7, 2019 at 8:31
  • 1
    $\begingroup$ You are welcome ! $\endgroup$ Commented Feb 7, 2019 at 8:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .