From the course: Data Science for Java Developers

Unlock this course with a free trial

Join today to access over 22,600 courses taught by industry experts.

Naive Bayes basics

Naive Bayes basics

- Okay. So we've seen how to implement one model using the k-NN Algorithm. And next, we're going to take a look at how to do the same kind of classification but using the Naive Bayes Algorithm. So what is the Naive Bayes Algorithm exactly? The Naive Bayes algorithm is based off of something called Bayes' theorem. Now I understand that this equation here might look a little bit intimidating to many of you, but it's a very very powerful equation in the realm of Data Science. So what this means, right? What you're looking at here, I'm just going to say it in sort of mathematical terms is that the probability of a given B is equal to the probability of B, given A times the probability of A divided by the probability of B still probably doesn't mean anything to many of you. So let me give you a more concrete example. So let's imagine that we wanted to build a spam prediction engine, right? Something that based on the words…

Contents