Types of Machine Learning
By: Laura Uzcategui
Tags: Artificial Intelligence, Reinforcement Learning, Supervised Learning, Machine Learning, Unsupervised Learning

Before moving into each of these areas, let’s clarify a few concepts around the Machine Learning Process. If you are familiar with how Machine Learning works, you can skip this section.

A high-level definition of Machine Learning can be seen as:

Given some data representative of an area (sales, politics, education) you are analysing and an algorithm, the ability of a computer can learn from this data and detect certain patterns on it. Followed by being able to tell (predict) you and determine the type of new data or at least an approximation of it.

Take this concept with a pinch of salt, as there is too much involved in the background about how ML is actually performed.

In other words, the computer is able to detect patterns by training (learning) from the input data. This process is highly iterative and needs lots of tuning. For example, It needs to check how far or close the prediction is from the real value, then correct itself by adjusting its parameters until reaching a point where the model is certainly accurate enough to be used.

Ok, now that we have an overview of the process. Let’s jump into types of Machine Learning.

ML Algorithms and Human intervention.

Machine Learning systems in this area could be seen as the amount of ”Supervision” a.k.a Human Interaction those will have over the training process. These are divided into 3 main categories, I will try to illustrate the following definitions with examples.

1. Supervised Learning

Imagine you are the owner of a local bookshop.

Photo was taken by the author

Your daughter Ana is a Data Scientist and she has offered to take books dataset recorded in your inventory system and implement a new system to speed up registration of new books arriving for sale.

Ana knows some characteristics of the books:

Genre ( Fiction, Non-Fiction, Fantasy, Thriller )

Hardcover, if a book is available on Hardcover

ISBN, the commercial id for the book

Title, Number of Pages

Extract of the book or Cover picture

Author

Now, Imagine having to allocate one book in a bookshelf. This is easy if you look up the metadata online and place the book on the Fiction shelf.

However, in reality, if you receive up to 200 books per day, you cannot do this job on your own, manually entering data on the system is prone to errors and you might end up putting books on the wrong shelf. This misplacement might end up in lower revenue as when a new customer comes incomes in and leaves unsatisfied because they cannot find the book even though it was actually on the store.

Ana’s new system is as easy as feeding the system with an extract or the cover of the book you are looking for and can tell you which shelf this should be placed on.

This particular example is called Classification because the system is just helping you to classify (organise) some data based on certain characteristics that you as user presented to it.

A real example of this kind of system is Google Photos.

Yet another type of Supervised algorithm is about predicting a numeric value, given a set of features or characteristics called predictors.

Now, you might actually ask how this happens?

An example of this is using Regression. A common and widely used algorithm known as Linear Regression and the purpose is to predict a continuous value as a result.

This actually translates to having a set of features or variables, and a set of labels that match this input features and all you want the algorithm to do is to learn how to “fit” the weights (parameters) associated with these features to give the approximate value that is closer to the real value.

2. Unsupervised Learning.

Unsupervised algorithms cover all cases when we do not have a label or real value to compare against. Instead, we do have sets of data, and the model will be trained and predicted based on how the data is grouped together, how it detects patterns, and if it shows certain behaviours.

A typical example of this type of Machine Learning is Clustering, where you group your data based on similarity. Real examples include Recommender Systems such as:

Retailer websites, like Amazon and Zalando.

Media / Streaming systems, like Netflix, Youtube among others.

There are lots of other algorithms that are used within this type, for example, Anomaly detection which might cover credit card fraud or account takeover situations that can be prevented and predicted with the use of ML.

Yet another of my favourite types of unsupervised learning algorithms that I’ve discovered recently are those used for data visualization, like t-SNE or t-Distributed Stochastic Neighbor Embedding.

I have used t-SNE in a couple of pet projects for sentiment analysis visualization and you could actually see the clusters forming within itself in high dimensional space using at the same time dimensionality reduction.

3. Reinforcement Learning.

Many books and websites refer to these algorithms like the beast but I like thinking about it about the top of the ice cream. Currently being a trending topic due to the achievements that are being accomplished in the area, which I will mention in a bit.

What would you do in this case? Most likely, you will play a couple of times, trying to investigate what are the best movements and the best route you can use to finally rescue the dogs from the shelter. This is similar to what a reinforcement algorithm will do, you can think of it as the following:

1. You are given an environment. (space in the context of the video game), representative of the state of certain variables on the space. Like roadblocks or crickets falling from the sky.

2. Actions to be performed during the event. ( movements, like going up, down, throw a ball to builders ), it’s worth noticing that some actions could be rewarded as “good”, and some others as “bad” meaning it will decrease your ability to achieve the goal.

3. Agents (roles in the video game, rescuer, or builder), the ones who will perform the action to achieve the goal at the minimum cost possible.

The way it works is the Agent observes the environment, tries to perform actions, and based on these actions will get rewarded for them or not. Potentially the Agents will learn on their own what is the best approach/strategy to pursue in order to get the maximum amount of points (rewards).

One of the best systems I’ve seen so far built with it are:

Hide and Seek, developed by OpenAI. Where they use a multi-agent approach teaching those to play hide and seek. There are 2 agents “hiders” and “seekers” and by observing the environment they were able to learn behaviour/actions that weren’t even provided, like using obstacles to pass barriers. If you are curious about how it works in depth you can watch the video below and the paper

Video Games, like StarCraf or AlphaStar. The agents play against humans and indeed it beat the best world player or beat other agents in a matter of a couple of seconds. In order to achieve this, the group that developed AlphaStar didn’t only use Reinforcement learning but others like using Supervised learning to train the neural networks that will create the instructions to play the game. If you are curious about how it was done, you can check their blog post here.

We have learned by now different types of Machine Learning systems based on how little or much the human interaction with those systems is applied. Now we can go ahead and explore the next 2.