4. Naive Bayes#
Naive Bayes is based on the Bayes Theorem. It measures the probability of each class, and the conditional probability for each class give values of x. This algorithm is used for classification problems to reach a binary yes/no outcome. Take a look at the equation below.
P(c∣x)=P(x)P(x∣c)∗P(c)
- P(c|x) = probability of the event of class c, given the predictor variable x,
- P(x|c) = probability of x given c,
- P( c) = probability of the class,
- P(x) = probability of the predictor
Naive Bayes classifiers are a popular statistical technique for filtering spam emails!
5. Support Vector Machines (SVM)#
SVM is a supervised algorithm used for classification problems. SVM tries to draw two lines between the data points with the largest margin between them. To do this, we plot data items as points in n-dimensional space, where n is the number of input features. Based on this, SVM finds an optimal boundary, called a hyperplane, which best separates the possible outputs by their class label.
The distance between the hyperplane and the closest class point is called the margin. The optimal hyperplane has the largest margin that classifies points to maximize the distance between the closest data point and both classes.