Machine Learning 101: Supervised, Unsupervised, Reinforcement

Machine Learning is a vast field, it includes many different ideas and approaches. Before learning about Machine Learning algorithms it is important to understand the three prominent areas in this field. After reading this article you will be able to tell the difference between the three paradigms and start learning about ML problems and solutions.

Supervised Learning

The first and most straightforward area is the Supervised Learning. In Supervised Learning the data is provided with a label or a target value that the algorithm needs to learn and be able to make predictions. During the training phase, the algorithm is provided with the answers (labels/values) so that it can learn to make better predictions. After the training phase, the so-called test phase takes place: the ML algorithm is tested against known labels/values in order to perform a basic evaluation of the model.

The standard example when it comes to Supervised Learning is handwriting recognition. The algorithm is provided with images representing characters and each image is labeled by the actual character it represents. While Supervised Learning can produce brilliant results, it often comes at a hidden cost: labeling. Most problems require a human to label the data and when you multiply that with humongous datasets, it soon becomes clear that resolving the problem using a supervised algorithm may not be the most pragmatic solution (Unsupervised Learning comes after the next section).

Supervised problems: Classification vs Regression

Supervised Learning essentially deals with two problems:

  • Classification: predicting a class, for example whether a user is male or female (the two classes) given their history of purchased items.
  • Regression: predicting a value, for example the price (the value) of a used car given the model, the age, the kilometers on the odometer.

In Classification problems the algorithm tries to predict the class the entry will fall into, it may be two classes (such as the example above, male versus female) or more than two classes. The former is often called Binary Classification the latter is referred to as Multiclass Classification.

In Regression there is no class to predict, instead there is a scale and the algorithm tries to predict the value on that scale. In the example above the price is the sought value.

Unsupervised Learning

When labels are not available and the target is not so evident there can be no supervision, hence the term Unsupervised Learning. Unsupervised Learning algorithms operate on data with no known label or target. Most of the time these algorithms produce results that need to be interpreted and may not even make sense to a human. Whereas Supervised Learning algorithm produce results that are easy to quantify, Unsupervised Learning algorithms may highlight patterns that humans struggle to see.

Unsupervised Problems: Clustering, Dimensionality reductions

The two main problems tackled by Unsupervised Learning are:

  • Clustering: identifying clusters, for example clustering people based on their height and weight.
  • Dimensionality reduction: reducing the number of dimensions, for example a dataset containing info about people (height, weight, hair color, eye color, foot length, waist length, shoulder length): this dataset contains seven dimensions and we may want to have less than seven to plot them.

While Clustering is similar to Classification, the algorithm doesn’t have any class to predict, it doesn’t even know how many classes there will be. Note that the algorithm doesn’t know what to search for, in the previous example its results may cluster male vs female or skinny vs obese people.

Dimensions are difficult to plot, and the more dimensions a model deals with the more complex it becomes. Dimensionality reduction deals with spaces composed of n-dimensions and project those dimensions in a lower-dimension space. Beware: reducing dimensions does not mean dropping a dimension entirely! In the example above we might reduce the dataset to six dimensions obtaining: Dimension1, hair color, eye color, foot length, waist length, shoulder length. The algorithm decided to combine height and weight to create Dimension1. While this may seem straightforward, what would happened if we asked the algorithm to produce three dimensions instead of six? The answer is that we would’ve reduced our space to a three-dimensional space (easily plot-able), yet understanding what the three dimension represent becomes difficult.

Reinforcement Learning

The last major area of Machine Learning is Reinforcement Learning. Reinforcement Learning works in a completely different way compared to SL and UL. While in the two previous area the datasets and labels play a key role in practical problems, in Reinforcement Learning there is no need for huge datasets, and the main components are the environment and the capability to perceive the state of the environment.

Imagine a game where the player is projected in wild lands and needs to find food to survive, when searching the player must also beware of peril such as wolves and bears. The environment is the place where everything happens, while the state can be perceived as the player being still alive or dead at any given time.

The algorithm doesn’t know about the food or the wolves, yet it knows about the player being still alive or not. During its training, the algorithm will try to maximize the period of time the player is alive. In order to be able to do this, the algorithm will need to learn about food and wolves, how to get the former and avoid the latter.

Reinforcement Learning is younger compared to SL and UL, yet it yields astonishing results even against humans. An example is Google DeepMind’s AlphaGo, which fought and defeated a human, master of Go.

Semi-supervised Learning and hybrids

Another frequently used term in Machine Learning is Semi-supervised Learning. As the name suggests, it is a combination of Supervised and Unsupervised Learning. A straightforward example can be predicting the species of a plant given many features such as the whether or not the plant yields flower, whether or not it has roots, how many leaves it has and so on. The dataset is labeled. While a Supervised approach may yield interesting and accurate results for this Classification Problem, we may reduce the number of features (Dimensionality Reduction) in order to get even better results. Albeit simple, this is a form of Semi-supervised Learning. Often times it is observed that hybrid approaches reach interesting conclusions whereas a straight SL/UL approach could not.

Image courtesy of mark | marksei

The following two tabs change content below.
The IT guy with a slight look of boredom in his eyes. Freelancer. Current interests: Kubernetes, Tensorflow, shiny new things.

You may also like...

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.