Akhila takes us through the intuition of how Naive Bayes works:
Usually we use the e1071 package to build a Naive Bayes classifier in R. And then using this classifier, we make some predictions on the training data.
So probability for these predictions can be directly calculated based on frequency of occurrences if the features are categorical.
But what if, there are features with continuous values? What the Naive Bayes classifier is actually doing behind the scenes to predict the probabilities of continuous data?
Click through for the answer. Also, Naive Bayes isn’t Bayesian, but that’s not important.