From the course: Data Science Foundations: Data Mining in Python

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Naive Bayes

Naive Bayes - Python Tutorial

From the course: Data Science Foundations: Data Mining in Python

Start my 1-month free trial

Naive Bayes

- [Instructor] A compelling choice for classification in a data mining context is the Naive Bayes model. And as I explained previously, Bayesian models are used to take observed probabilities and prior probabilities and from those calculate posterior, or you might say, observed probabilities, how likely is something based on the data that we have and what we knew beforehand? The Naive part means that the individual variables are treated separately, which dramatically simplifies the calculations going into it, and it turns out to function effectively in a wide variety of situations. We'll do this by first importing a number of libraries, including some from Scikit-Learn, which will give us the functionality for Naive Bayes. Then we'll load and prepare the data from the local CSV and split it into the training and testing parts. Take a look at the first few rows. We have seen this before. These are the attribute variables of…

Contents