Text Classifier
What is it ?
The Naive Bayes classifier is just about counting how many time a word appear in each class.
It is the most simple algorithm that you can apply to your data. As the name suggests, this algorithm makes an assumption as every feature is independent ( not correlated to each other)of the others, in order to predict the class of a given sample
Why do we use it ?
Because it has been proved to not only be simple but also very fast, accurate, reliable and easy to implement: just count words.
The simplest solutions are usually the most powerful ones, and Naive Bayes is a good example of that.
Bayes Theorem
- P(A|B) is “Probability of A given B”, the probability of A given that B happens(Posterior)
- P(A) is Probability of A(Prior)
- P(B|A) is “Probability of B given A”, the probability of B given that A happens(likelihood)
- P(B) is Probability of B(evidence/marginal likelihood)
When do we use it ?
This powerful algorithm used for
- Real time Prediction
- Text classification/ Spam Filtering
- Recommendation System
In practice
I hope this explains well what Naive Bayes classifier is. Naive Bayes is very intuitive and does not require a large amount of calculation.
Feel free to leave comments, feedback, and suggestions ☺.😉