Supervised, unsupervised, and reinforcement learning. The three pillars of machine learning.
Have you ever heard people mention supervised or unsupervised learning when they’re talking about machine learning techniques? Have you then wondered if that means that for some techniques you have to sit there and actually watch the computer do its thing, while for others need you to go away for it to work?
This article will help you understand what the difference between supervised and unsupervised learning is and how they are used in the day to day lives of data scientists.
So what is the difference?
The reality is that the main difference between the two types of machine learning techniques comes down to the data, namely the presence of available data labels.
In addition to the types of data used, they also differ in their objectives. Supervised techniques are used to predict what will happen when the model sees new data, while unsupervised techniques are used to gain (hopefully!) valuable insights from new data and provide feedback on what it sees as atypical or interesting.
What is supervised learning?
Supervised learning algorithms use labelled datasets for training the model, which can then be used for purposes such as:
- Classification
- Regression
Classification, in this context, is the use of machine learning models to group data into distinct groups. You may have seen examples of this in fun tools that can tell you if a picture is of a cat or a dog. Many pieces of tech in the world use classification algorithms to assist us in our day to day lives including:
- Facial recognition systems
- Finance applications
- Weather forecasts
Regression uses models of labelled data to predict the values of unknowns using previous data. A great example of this is the prediction of house prices in a neighbourhood. Other examples of regression in the world include:
- Stock market trends
- Predicting a baby’s growth
- Predicting the impact of fertiliser on crop yield
So we can already get an idea of how supervised learning can be used to enhance our day to day living and assist us with making data based decisions.
If you want to read more on supervised machine learning algorithms then see my posts on decision trees and linear regression:
What is unsupervised learning?
Do you remember the other day when you walked away from your computer and when you came back it had learnt something new? Well that is unsupervised learning… Just kidding! Right, computer?
Anyways, we were talking about unsupervised learning. Which unlike supervised learning does not care for labelled data, it doesn’t need it.
So if it doesn’t need labels to do its job, how does unsupervised learning work? Great question.
Essentially it uses very clever algorithms to look for hidden patterns in the data without the need for a pesky human to tell it what to look for, i.e. it doesn’t need any labels, hence it is ‘unsupervised’.
The algorithms that make up the unsupervised toolkit perform one of three tasks being:
- Clustering
- Association
- Dimensionality reduction
Can we combine them? Enter semi-supervised learning!
Imagine a world where you can have it all, where you can have some labelled data and still find interesting insights from a large dataset. Enter semi-supervised learning where you essentially combine the advantages of both to provide a lovely middle ground of functionality.
Semi-supervised learning is great for when you have a small portion of your data that has been labelled and you want to use those labels as a kind of road map for the rest of the predictions. This is very useful in the medical diagnostics field where machine learning algorithms are helping radiologists read medical images for presence of cancer or other diseases.
So yes, you can combine the two types of learning, but of course there is always a trade-off so it’s important to use the best technique for the data and task you have in front of you.
Could you build on that?
Of course! In fact, now that you mention building, there is another type of machine learning that we have not talked about: reinforcement learning.
Reinforcement learning
Reinforcement learning is the third main class of machine learning algorithms which aims to find the middle ground between exploration of the data, such as unsupervised learning, and the usage of that knowledge, such as supervised learning. Unlike supervised learning it does not require a labelled dataset, and unlike unsupervised learning it does not focus solely on finding patterns without an intended application. Instead, it seeks to maximise the reward function in the long term even if that means experiencing negative reward, otherwise known as regret, in the short term for a overall positive experience.
Applications of reinforcement learning include:
- Robotics
- Game theory
The Monte Carlo methods are a famous group of algorithms in the reinforcement learning space, which have applications in many fields of study including particle physics, computational biology, mathematics and optimisation, where they are used to simulate data with high levels of dimensionality.
Where to now?
If you want to learn more about the algorithms that make up both supervised and unsupervised algorithms then stay tuned as I am bringing more content on these topics soon.
If you want a general overview of data science then see my post about teaching data science to children.
Or if you want a post about teaching programming using Minecraft then the following post is for you:
I hope that this brief introduction to the world of machine learning has provided you with some insight into the differences between the techniques used. I aim to provide easy to follow outlines of topics relating to machine learning, data science and programming.
If you have enjoyed this article then please connect with me via LinkedIn or Twitter.
