REVIEW QUESTIONS 1. What is special about the Naïve Bayes algorithm? What is the meaning of “Naïve” in this algorithm? 2. What are the advantages and disadvantages of Naïve Bayes compared to other machine-learning methods? 3. What type of data can be used in Naïve Bayes algorithm? What type of predictions can be obtained from it? 4. What is the process of developing and testing a Naïve Bayes classifier?
Added by Tom M.
Step 1
1. What is special about the Naïve Bayes algorithm? What is the meaning of “Naïve” in this algorithm? ** Show more…
Show all steps
Your feedback will help us improve your experience
Aparna Shakti and 63 other AP CS 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
Naïve Bayes classifiers are based on the class-conditional independence assumption, which means the following: a) the data samples in the training set are independent from the samples in the test set. b) There is no dependence relationship among the different samples in the data set. c) There is no dependence relationship among the attributes describing the data samples. d) The class labels are independent, that is not two class labels have a dependence relationship.
Aparna S.
Akash M.
In order to reduce my email load, I decide to implement a machine learning algorithm to decide whether or not I should read an email, or simply file it away instead. To train my model, I obtain the following data set of binary-valued features about each email, including whether I know the author or not, whether the email is long or short, and whether it has any of several key words, along with my final decision about whether to read it (y = +1 for "read", y = -1 for "discard"). x1 know author? x2 is long? x3 has 'research' x4 has 'grade' x5 has 'lottery' y read? 0 0 1 1 0 -1 1 1 0 1 0 -1 0 1 1 1 1 -1 1 1 1 1 0 -1 0 1 0 0 0 -1 1 0 1 1 1 1 0 0 1 0 0 1 1 0 0 0 0 1 1 0 1 1 0 1 1 1 1 1 1 -1 I decide to try a naïve Bayes classifier to make my decisions and compute my uncertainty. In the case of any ties where both classes have equal probability, we will prefer to predict class +1. 1. Compute all the probabilities necessary for a naïve Bayes classifier, i.e., the class probability p(y) and all the individual feature probabilities p(xi|y), for each class y and feature xi. 2. Which class would be predicted for x = (0 0 0 0 0)? What about for x = (1 1 0 1 0)? 3. Compute the posterior probability that y = +1 given the observation x = (0 0 0 0 0). Also compute the posterior probability that y = +1 given the observation x = (1 1 0 1 0). 4. Why should we probably not use a "joint" Bayes classifier (using the joint probability of the features x, as opposed to the conditional independencies assumed by naïve Bayes) for these data? 5. Suppose that before we make our predictions, we lose access to my address book, so that we cannot tell whether the email author is known. Do we need to re-train the model to classify based solely on the other four features? If so, how? Hint: what parameters do I need for a naïve Bayes model over only features x2,...,x5? What, if anything, changes about the parameters or the way they are used?
C D.
Recommended Textbooks
Computer Science and Information Technology
Introduction to Programming Using Python
Computer Science - An Overview
Transcript
18,000,000+
Students on Numerade
Trusted by students at 8,000+ universities
Watch the video solution with this free unlock.
EMAIL
PASSWORD