When I first started learning machine learning, the basic idea sounded quite simple.
Give a computer some examples, let it learn from them, and then ask it to make predictions on new data.
The Supervised Learning module in my MSc in Artificial Intelligence and Machine Learning showed me what actually goes into making that work.
It introduced me to the process of taking labelled data, training different types of models and, most importantly, working out whether those models have actually learned something useful.
What Does "Supervised" Mean?
Supervised learning uses labelled data.
This means that during training, we already know the correct answer for each example.
For instance, imagine having historical information about customers along with a record of whether each customer eventually left a company.
The customer information becomes the input, while "left" or "stayed" becomes the known outcome.
A supervised learning algorithm looks for patterns connecting those inputs to the outcomes.
Once trained, the model can be given information about a customer it has never seen before and attempt to predict what that customer might do.
Of course, making that prediction reliably is where things become more complicated.
Classification or Regression?
One of the first distinctions I learned was between classification and regression.
Classification is used when the outcome belongs to a category.
Examples include:
- Spam or not spam
- Fraudulent or legitimate transaction
- Customer will churn or stay
- Image contains a cat or a dog
Regression is used when the outcome is a numerical value.
For example:
- Predicting a house price
- Forecasting sales
- Estimating energy consumption
- Predicting delivery time
The difference seems straightforward, but recognising the type of problem is important because it influences which algorithms and evaluation methods make sense.
There Is No "Best" Algorithm
Throughout the module, I explored several well-known supervised learning algorithms, including:
Linear Regression
Logistic Regression
Decision Trees
Random Forests
Support Vector Machines (SVM)
k-Nearest Neighbours (KNN)
Naive Bayes
At first, it is tempting to ask which algorithm is the best.
I gradually realised that this is usually the wrong question.
Different algorithms make different assumptions about the data and solve problems in different ways.
A model that works very well on one dataset may perform poorly on another.
A simpler model can sometimes perform just as well as a more complicated one.
So rather than looking for one algorithm that solves everything, the real task is to understand the problem, experiment with appropriate models and compare the results properly.
Training a Model Is Only Half the Job
One of the most useful parts of the module was learning how to evaluate models.
If I train a model using a dataset and then test it using exactly the same data, I may get an impressive result.
But that does not tell me much about how the model will behave when it encounters something new.
This is why datasets are commonly separated into training and testing data.
The model learns from the training portion.
The test data is then kept separate so that we can evaluate how well the model performs on examples it did not use during training.
I also learned about cross-validation, which provides a more systematic way of evaluating a model across different parts of the available data.
These techniques introduced one of the most important ideas in machine learning:
A useful model needs to generalise.
It should not simply remember the examples it was trained on.
Accuracy Can Be Misleading
Another lesson that stayed with me was that accuracy is not always the right metric.
Imagine a dataset containing 1,000 transactions.
Suppose only 10 are fraudulent.
A model could predict "not fraud" for every single transaction and achieve:
990 correct predictions out of 1,000 = 99% accuracy
That sounds excellent.
In reality, the model has failed to detect every fraudulent transaction.
This is why we also need measures such as precision, recall and F1-score, along with tools such as the confusion matrix.
Each tells us something different about model behaviour.
For regression problems, other measures are needed to understand how far predicted numerical values are from the real ones.
The correct evaluation metric depends on what the model is being used for.
Missing a fraudulent transaction may have a very different cost from incorrectly flagging a legitimate one.
The business or real-world problem therefore matters just as much as the mathematical score.
When a Model Learns Too Much
The module also helped me understand overfitting.
An overfitted model performs extremely well on the data it has already seen but struggles when presented with new examples.
It has effectively learned the training data too closely rather than learning patterns that generalise.
The opposite problem is underfitting.
In this case, the model is too simple, or has not learned enough from the data, so it performs poorly even on the training examples.
The challenge is finding the balance between the two.
We want a model that captures meaningful patterns without becoming too dependent on the exact examples used during training.
The Data Matters as Much as the Model
Another important part of supervised learning happens before the algorithm is trained.
Real datasets are rarely ready to use immediately.
There may be:
- Missing values
- Categorical variables
- Irrelevant features
- Different numerical scales
- Duplicate records
- Noisy data
- Imbalanced classes
This is where data preprocessing and feature selection become important.
A sophisticated algorithm trained on poor-quality data will not magically produce a good model.
In many cases, preparing and understanding the data can require more effort than training the model itself.
That was an important change in how I viewed machine learning.
From Running Algorithms to Understanding Results
It is relatively easy to write a few lines of Python using a machine learning library and produce a prediction.
The difficult part is knowing whether that prediction should be trusted.
Why did I choose this algorithm?
How was the data prepared?
Did I accidentally allow information from the test set into training?
Which metric should I use?
Is the model overfitting?
Would another model perform better?
Does the result make sense for the actual problem?
Those questions are what turn model training into a proper machine learning process.
What I Took Away From the Module
Supervised Learning gave me a much stronger foundation in how predictive machine learning actually works.
I learned the theory behind classification and regression, explored several widely used algorithms, and became more comfortable with training, testing and comparing models.
But the most useful lesson was that machine learning is not simply about choosing an algorithm and pressing run.
The quality of the data matters.
The way the experiment is designed matters.
The evaluation metric matters.
And performance on unseen data matters far more than producing an impressive score on the training set.
That foundation became useful throughout the rest of my MSc, because once I started working on larger machine learning projects, the same questions kept appearing.
What exactly am I trying to predict, and how do I know whether my model is actually good at it?




Join the conversation
Loading comments…