3. Naive Bayes for data with nominal attributes. Given the training data in the table below (Buy Computer data), predict the class of the following new example using Naive Bayes classification: age?30, income=medium, student=yes, credit-rating=fair. Please show your work. ID age income student credit-rating Class: buys-computer 1 ?30 high no fair no 2 ?30 high no excellent no 3 31...40 high no fair yes 4 >40 medium no fair yes 5 >40 low yes fair yes 6 >40 low yes excellent no 7 31...40 low yes excellent yes 8 ?30 medium no fair no 9 ?30 low yes fair yes 10 >40 medium yes fair yes 11 ?30 medium yes excellent yes 12 31...40 medium no excellent yes 13 31...40 high yes fair yes 14 >40 medium no excellent no
Added by Jason H.
Close
Step 1
\[ P(\text{Yes}) = \frac{\text{Number of Yes instances}}{\text{Total instances}} = \frac{9}{14} \] \[ P(\text{No}) = \frac{\text{Number of No instances}}{\text{Total instances}} = \frac{5}{14} \] Show more…
Show all steps
Your feedback will help us improve your experience
Banhishikha Sinha and 69 other Intro Stats / AP Statistics educators are ready to help you.
Ask a new question
Labs
Want to see this concept in action?
Explore this concept interactively to see how it behaves as you change inputs.
Key Concepts
Recommended Videos
Consider the training data below. Classify the following test records based on a Naive Bayes classifier trained on the training data: a) X=(S=CS, M=Yes; Mz=No, P=No) b) Y=(S=CS, Mi=No, Mz=Yes, P=Yes) Attributes: M; Mz P Class CS Yes Ycs No CS Yes Yes Yes CS Yes Ycs No CS Yes Yes No Phys Yes No Yes Phys No No No CS Yes Ycs Yes CS No Yes No Econ Yes Yes Yes Econ No No Yes
Sri K.
Suppose that the following training data have the indicated labels. Using a Naive Bayes classifier, classify (find the label) for the point x = (1, 1, 0, 1, 0, 0, 0, 1). Make sure to write both probabilities P(C = spam | X = x) and P(C = not spam | X = x).
Krishna G.
Madhur L.
Recommended Textbooks
Elementary Statistics a Step by Step Approach
The Practice of Statistics for AP
Introductory Statistics
Watch the video solution with this free unlock.
EMAIL
PASSWORD