Understanding Naïve Bayes
Naïve Bayes uses conditional probabilities in order to classify the observations. In this section, you will learn how it works. We will invent a simple dataset, and a disease, for this purpose. Let's have a look at the table. The table shows health behaviors of 11 individuals and whether or not 10 of them have developed DiseaseZ
(the name of our made up disease) one year after these behaviors have been assessed. What we want to know is whether the individual is at risk of developing the disease. We will solve this using existing data about the individual and associations previously found in other individuals:
Smoking |
Drinking |
PhysicalActivity |
Movies |
Music |
Sunbathing |
DiseaseZ |
---|---|---|---|---|---|---|
YES |
YES |
NO |
NO |
NO |
YES ... |
Get R: Predictive Analysis now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.