Machine Learning: Supervised Learning 2
In the previous post, I talked about Linear Regression which predicts continuous values. But In the real world most of the time we are classifying things to distinguish them from one another. The next algorithm I am going to talk about is a classification algorithm. Naive Bayes It is a really fast classification algorithm based on the Bayes theorem. It works on the Bayes Theorem of probability. Bayes Theorem We make two assumptions when we use this algorithm. One is that each feature is independent of each other and all predictors have an equal effect on the outcome. What this algorithm does is it first converts the data into a frequency table and calculates the conditional probability for each event. Final function that is used to give prediction is Types of Naive Bayes Classifiers: Multinomial Naive Bayes: This is mostly used for document classification problem, i.e whether a document belongs to the category of sports, politics, technology...