No history yet

Introduction to Machine Learning

Learning from Patterns

At its heart, machine learning is about teaching computers to learn from data without being explicitly programmed for every task. Instead of writing step-by-step rules, we provide a model with a vast amount of information and let it figure out the underlying patterns on its own. It's a bit like how a child learns to identify a dog. You don't list out all the rules for what makes a dog; you just point to different dogs. Over time, the child's brain builds a model to recognise them.

machine learning

noun

A field of artificial intelligence that uses statistical techniques to give computer systems the ability to 'learn' from data, without being explicitly programmed.

This process of learning can happen in a few different ways. The two most common approaches are supervised and unsupervised learning. The main difference between them comes down to one thing: labels.

Two Ways to Learn

Imagine you're trying to sort a big pile of fruit. You could tackle this in two ways.

Supervised learning is like having a teacher. You show the machine an example and tell it what it is. For the fruit pile, you would pick up an apple and say "this is an apple," then pick up an orange and say "this is an orange." After showing it hundreds of labelled examples, the machine learns the features of each fruit—colour, shape, texture—and can start identifying new, unlabelled fruits on its own.

The 'supervision' comes from the labelled data, which acts as an answer key. The model's goal is to learn a mapping function that can correctly predict the output label for new input data.

In supervised learning, the model learns from data that is already labelled with the correct answer.

Unsupervised learning is the opposite. You give the machine the same pile of fruit but provide no labels or instructions. It's like saying, "Here's a bunch of stuff, find some structure in it." The algorithm examines the data and might notice that some items are round and red, while others are round and orange. It will then group them based on these shared characteristics, creating two clusters. It won't know one cluster is 'apples' and the other is 'oranges', but it successfully separates them based on their inherent properties.

In unsupervised learning, the model finds hidden patterns in unlabelled data on its own.

This article focuses on supervised learning, as it's one of the most common and powerful types of machine learning used today. Let's look at a clear summary.

FeatureSupervised LearningUnsupervised Learning
Input DataLabelledUnlabelled
GoalPredict outcomesDiscover hidden patterns
ProcessTraining with an answer keyFinding structure on its own
AnalogyA student with a teacherAn explorer in new territory

Supervised Learning in Action

Supervised learning is all around us, powering many of the applications we use daily. Its ability to make predictions based on past data makes it incredibly versatile.

One of the most common applications is in your email inbox. Spam filters are classic examples of supervised learning. They are trained on millions of emails that have been labelled by humans as either 'spam' or 'not spam'. The model learns to identify the characteristics of junk mail, such as certain keywords, unusual formatting, or suspicious links. When a new email arrives, the model predicts whether it's spam and routes it accordingly.

Lesson image

Another major area is image recognition. When you upload a photo to a social media site and it automatically suggests tagging your friends, that's supervised learning at work. The model has been trained on a massive dataset of photos where people have already been tagged. It learns to associate the specific facial features of your friends with their names.

Medical diagnosis is another field being transformed by this technology. Models can be trained on thousands of medical images, like X-rays or scans, that have been labelled by expert radiologists as showing a disease or being healthy. The trained model can then assist doctors by highlighting potential areas of concern in new scans, leading to earlier and more accurate diagnoses.

Ready to check your understanding?

Quiz Questions 1/4

What is the fundamental principle of machine learning?

Quiz Questions 2/4

A hospital wants to build a system that can predict whether a patient has a specific disease based on thousands of past medical scans that have been labelled as 'diseased' or 'healthy' by expert radiologists. Which type of machine learning is this?

Understanding these core ideas is the first step. By training models on labelled data, supervised learning allows us to build powerful tools that can predict, classify, and help us make sense of the world.