In this chapter, we will look at various methods for classifying data, and focus on binary data. We will start with a simple algorithm—the k-nearest neighbors algorithm. Next, we will move on to decision trees. We will then look at an ensemble method and combine multiple decision trees into a random forest classifier. After that, we will move on to linear classifiers, the first being the Naive Bayes algorithm. Then, we will see how to train support vector machines. Following this, we will look at another well-known and extensively used classifier—logistic regression. Finally, we will see how we can extend algorithms for binary classification to algorithms that are capable of multiclass classification.
The following topics will be covered in this chapter:
- K-nearest neighbors classifier
- Decision trees
- Random forests
- Naive Bayes
- Support vector...