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!


"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$ – Ankit Kumar Feb 7 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$ – Popescu Claudiu Feb 7 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$ – Ankit Kumar Feb 7 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$ – Popescu Claudiu Feb 7 at 8:31
  • 1
    $\begingroup$ You are welcome ! $\endgroup$ – Popescu Claudiu Feb 7 at 8:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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