1
$\begingroup$

I am required to use the Naive Bayes classifier to classify example 8, to see whether it is poisonous or not.

enter image description here

I gained the following results:

p(x|Poisonous=Y) = 0.0267857 and

p(x|Poisonous=N) = 0.0101989

If I am given extra information at a later stage that there is a 0.05 chance of poisonous plants being found, hence 0.95 chance of them not being found. How should I go about classifying example 8 based on the new data?

Any help would be appreciated.

$\endgroup$
2
$\begingroup$

Bayes Theorem:

$P(A|B) = \frac{P(B|A)P(A)}{P(B)}$

So it seems what you're looking for its:

$P(poisonous=Y|X) = \frac{P(X|poisonous =Y)P(poisonous)}{P(X)}$

Use the law of total probability:

$P(poisonous=Y|X) = \frac{P(X|poisonous=Y)P(poisonous)}{P(X|poisonous=Y)P(poisonous) + P(X|poisonous=N)P(not poisonous)}$

It seems like you know what you need to know to get to the answer.

$\endgroup$
1
$\begingroup$

Think about your extra information as a new prior: $P(\textrm{Poisonous}) = 0.05$. It should be pretty easy to slot that into Bayes' Rule, no?

$\endgroup$
0
1
$\begingroup$

Use this formula to evaluate:-

probability for Y= P(yes).P(green|Y).P(soft|Y).P(Y|Y).P(wrinkled|Y).

probability for N= P(No).P(green|N).P(soft|N).P(Y|N).P(wrinkled|N).

IF probability for Y > probability for N then new data belongs to class Yes otherwise to class No.

$\endgroup$

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.