• Skip to primary navigation
  • Skip to main content
The Data Lab

The Data Lab

Pruple button with the word menu
  • About Us
        • About Us

           
          Visit our About Us page

        • Careers
        • Our Team
        • Impact
        • The Scottish AI Alliance
        • Contact us
  • Business
        • For Business

           

          Visit our Business Support page

        • Access Talent
        • Funding and Business Support
        • Partnerships
  • Professionals
        • For Professionals

           

          Visit our Professional Development page

        • Online Courses
        • Data Skills for Work
  • Students
        • For Students

           

          Visit our Students page

        • The Data Lab Academy
        • Student Placements
        • Scholarships
  • Universities and Colleges
        • For Universities and Colleges

           

          Visit our Universities and Colleges page

        • Funding and Support
        • Collaborate and Innovate
        • Academic Projects
  • Community
        • Community

           

          Visit our Community page

        • Online Community
        • News
        • Case Studies
        • DataFest

Back to Basics – What are the different types of machine learning?

Technical Skills 04/07/2022

cgi generated metal grids that give the appearance of fuse boards and connections

In our new series, Back to Basics, we aim to simplify answers to some of the most frequently asked questions about data technologies and data science.

Following on from Joanna McKenzie’s blog, ‘What is machine learning?’, our Data Scientist Anselma Foxton talks about the different types of machine learning.

In this article:

  • Types of machine learning
  • What is supervised learning?
  • What is unsupervised learning?
  • What is semi-supervised learning?
  • Summary of machine learning types

Types of machine learning, with examples …

Overall, there are four different types:

  •  Supervised learning
  •  Unsupervised learning
  •  Semi-supervised learning
  • Reinforcement learning

Different scenarios require different types of machine learning – it all depends on the problem you need to solve, the available data, and the required outcome.

So, let’s explore what each type means and when you would use them.

What is supervised learning?

Supervised learning is used to classify or predict a particular event/measure when you have past examples that you can learn from.

Let’s say we want to classify whether a customer is likely to leave our energy company, and we have past examples of this. We can take our historical data to identify whether there are any patterns in how customers have recently engaged with us and whether they have subsequently chosen to leave. These identified patterns can then help to classify whether a customer, that we haven’t seen before, is likely to leave soon.

Let’s look at this in a very simple visualisation:

Supervised learning data

From this historical data, we can see that there is a pattern, where customers who have called us multiple times and with long call durations, have left soon after. However, customers that have engaged with us less, both in terms of call numbers and duration, have been retained.

Based on these patterns, we can look at a customer’s recent engagement, which we haven’t seen before, and work out whether they are likely to leave.

The below customer seems to have contacted the business multiple times and with long call durations, therefore, we can say that they will most likely leave soon. This information allows us to take action before it’s too late, to try and help retain the customer.

potential data for a customer services call chart - headings: call to customer services, average call length, unknown outcome

This is a very simplified example of the type of data and situation where supervised learning could be used. Yet, it gives the premise of how patterns are identified using past examples and how they are used to classify or predict an event (e.g., customer churn) or a measure (e.g., house prices).

What is unsupervised learning?

Unsupervised learning is different in that you don’t have any past examples to learn from and you don’t have a particular event/measure in mind. Instead, unsupervised learning looks to group, cluster and organise the data in a way that humans can understand.

For example, say we are a retail shop, and we want to understand the make-up of our customers.

We can take the information we have on our customers, such as their age, common payment type, the amount spent, frequency of purchases, etc., and see if there are any inherent groupings within the data.

Let’s take the simple visualisation below:

chart showing the 3 different age demographics of a shop customer and their characteristics

The characteristics of these customers are examined for their similarities and differences, and groups are formed. These groups can then be explored to understand why certain customers have been clustered together. If we look at the top group (in grey), these customers have been grouped together as they are of a younger age group, predominately pay with card and use the store’s app.

Comparing this to the last group (in dark green), these customers are of an older age, predominately pay with cash and mainly visit the store. As a result, these groupings allow us to understand the different types of customers that purchase products from our shop.

Unsupervised learning is used when you solely want to identify the patterns within the data, without examining against a pre-defined event/measure.

What is semi-supervised learning?

Semi-supervised learning sits between supervised and unsupervised learning.

You want to classify or predict a particular event/measure, but you only have a small number of confirmed past examples for the machine to learn from.

Semi-supervised learning allows you to use this small portion to help work out the possible outcomes of the remaining historical data. These estimated outcomes can then be used alongside the confirmed examples to classify or predict the event/measure.

What is reinforcement learning?

Reinforcement learning is very different from the above types of machine learning that we have covered so far. This is because reinforcement learning doesn’t learn from historical data. Instead, a process of trial and error is carried out to get the best outcome.

We, as humans, do this in real life all the time when learning new skills. For example, a toddler learning to walk is very much a process of trial and error. The toddler may stand up, walk a step, and then fall over. They may try again, but this time walk two steps before falling over. The toddler can see that walking is the best outcome and so will repeat this process until they can fully walk.

flowchart highlighting how a computer will play a games ot learn how to win rewards

This idea is reflected in reinforcement learning, where the computer itself learns the best approach(es) to get the best outcome. An example of this is a computer learning to play a game when it only knows the rules of the game.

The goal for the computer is to choose actions that gain the most points. Every time an action is carried out by the computer, a reward or punishment (e.g. +1 or -1) is given. From this, the computer can understand if that action was a good choice. This process then continues over and over again until the computer learns which approaches are the best.

Reinforcement learning is all about the computer making decisions sequentially, so it takes into account the output from the previous action to then decide what to do next.

Summary of machine learning types

To summarise the different types of machine learning

Supervised Learning – To classify or predict a particular event/measure by learning from past examples

Unsupervised Learning – To identify patterns within the data without examining against a pre-defined event/measure

Semi-supervised Learning – To classify or predict a particular event/measure but a limited number of confirmed past examples are available. This learning is a combination of supervised and unsupervised.

Reinforcement Learning – A process of learning through trial and error

Anselma and The Data Lab’s Data Scientists regularly support organisations with new digital projects.

Our Internal Data Science projects include up to 20 days of Data Scientist time, and are available to organisations in any sector with a presence in Scotland. They will work with you to scope your proposal and provide project support.

Reader Interactions

Leave a Reply

Your email address will not be published. Required fields are marked *

Innovate • Support • Grow • Respect

Get in touch

t: +44 (0) 131 651 4905

info@thedatalab.com

Follow us on social

  • Twitter
  • YouTube
  • Instagram
  • LinkedIn
  • TikTok

The Data Lab is part of the University of Edinburgh, a charitable body registered in Scotland with registration number SC005336.

  • Contact us
  • Partnerships
  • Website Accessibility
  • Privacy Policy
  • Terms & Conditions

© 2025 The Data Lab