3Machine Learning Algorithms

A photograph of a kid and a bird sitting on a rooftop.

Photo by Annamária Borsos

In the literature, we can find many machine learning algorithms that can be used for different tasks, including simple linear regression for prediction problems, decision trees, naïve Bayes classifiers, random forests, neural networks, and support vector machines (SVMs). In this chapter, we will study some of the most commonly used machine learning algorithms along with their fundamental math, use cases, and coding using Python and the various libraries presented in the first chapter of this book. We have already encountered the concepts of supervised, unsupervised, and reinforcement learning. If we probe a bit more, we can categorize the algorithms based on their underlying mathematical model: regression, clustering, Bayesian, neural network, ensemble, regularization, rule system, dimensionality reduction, or decision tree. We have already seen some algorithms and their respective categories.

As its name indicates, Bayesian machine learning models are based on Bayes' theorem. It means that machine learning models are based on the calculation of probability, for instance, the probability that Cristiano Ronaldo will score three goals knowing that he scored two in his last match. Regression involves finding a relationship between variables in our data. This is based on geometry as we try to find the line with best slope ...

Get Machine Learning Theory and Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.