Introduction
The use of machine learning
Machine learning is a core mechanism behind modern AI systems and data science. It helps us understand complex relationships within data and build predictive tools that drive countless applications. Examples include:
Prediction
Prediction: predict a value (class or numerical value) based on some related features.
Probably the most common use of machine learning is making predictions.
These predictions can take the form of:
- A numerical value (e.g. the estimated price of a house), or
- A category or class (e.g. whether a patient is positive or negative for a disease)
Let’s explore a few real-world use cases in more detail:
House price prediction
If you want to estimate the market value of a house, you can build a model that considers features such as:
- Neighbourhood
- Amenities
- Commute options
- Size and condition of the house
- Size of the garden
- Year of construction, and more
As a skilled valuator, you might be able to make a decent estimate yourself; but manual estimations can be inconsistent, and it’s hard to scale when demand increases. A machine learning model, trained on previously appraised homes, can help standardise predictions and assist less experienced colleagues in making more accurate valuations.
Churn prediction
Another powerful application of machine learning is predicting customer churn — in other words, identifying which customers are likely to stop using your product or service.
For example, in a subscription-based business, a model might analyse customer behaviour over time: how often they log in, how actively they engage with the product, whether they’ve contacted support recently, or if their usage patterns have changed. Based on these signals, the model can estimate the likelihood that a customer is about to leave.
This allows businesses to take action before it’s too late — by sending targeted offers, reaching out with personalised messages, or offering better support to re-engage the user.
Churn prediction is used across many industries, such as telecom (to predict cancelled phone contracts), SaaS platforms (to reduce subscription drop-off), and banking (to identify customers who may close their accounts).
Image recognition
Machine learning is especially powerful in analysing visual data. Over the past two decades, there have been major advancements in image recognition. These models can be used correctly classify images.
Diagnosing a patient
Medical diagnoses often depend on a wide range of information — and it’s easy to miss something. Machine learning can combine data from various sources:
- Imaging (e.g. X-ray, MRI)
- Blood test results
- Family history
- Lifestyle factors
- Personal medical history
Based on this input, a model can estimate the likelihood of certain conditions and help support clinical decision-making — especially in complex cases.
Text classification & labelling
What if your company receives thousands of emails or messages every day? It would be incredibly helpful if some of those could be handled automatically.
Machine learning models can. Classify incoming messages to the correct department or detect the intent of a message (e.g. complaint, query, order). It can even respond automatically with predefined answers for frequently asked questions
It’s not all to uncommon for over 50% of incoming messages to be handled automatically using machine learning — saving time and improving response speed.
Statistical inference
Statistical inference: Understanding relationships within data.
Sometimes, prediction is not the final goal — it's simply a means to an end. In these cases, the purpose of modelling is to understand why certain things happen, so you can make informed, data-driven decisions.
Cause of a disease
For example, in healthcare, it’s helpful to predict the likelihood of a diagnosis — but sometimes what we really want to know is what factors are contributing to that diagnosis. Is family history the strongest signal? Or did one of the twenty blood test measurements reveal something critical? This kind of analysis can help guide treatment or inform further testing.
Data-driven decision making in business and marketing
In business, statistical inference also plays a key role. Imagine you're using multiple marketing channels: LinkedIn, YouTube, radio, television, and newspapers. You’d like to understand which of these platforms is delivering pound for pound. By building a model that accurately predicts monthly sales based on ad spending per platform, you can start to infer which channels are the most effective. This insight allows you to optimise your marketing budget, reallocating funds to the platforms that perform best; or maybe find synergies between different channels.
Clustering
Clustering: finding structure in data.
Sometimes, the goal of machine learning isn’t to predict a value, but to discover structure in your data — specifically, to find out which samples are similar to each other. This process is known as clustering.
Clustering helps you group data points based on shared characteristics, without needing labels or predefined categories. It’s especially useful for exploratory analysis and gaining insights into the hidden patterns within your data.
Clustering offers a powerful way to uncover structure in unlabelled data — and often serves as a starting point for deeper analysis.
Customer segmentation
One common use case is customer segmentation. Suppose you run a retail shop and want to better understand the types of customers you serve. By clustering based on factors like purchase history, browsing behaviour, and demographics, you can uncover distinct customer groups. This knowledge allows you to tailor marketing strategies or personalise offers to suit different audiences.
Topic modeling
Another use case is topic modelling. News organisations publish thousands of articles on a wide range of subjects. Clustering algorithms can group similar articles together, helping to identify the main topics covered. This way, you can more easily track how often certain issues are discussed — or quickly find articles related to your area of interest.
Search
Search: search for the most similar samples.
Search is closely related to clustering; both aim to find similar data points, but the goal is different. While clustering tries to group similar items together globally, search is more about finding the best matches for a specific query.
Rather than asking “what are the groups in my data?”, search asks,
“Given this example, what else looks like it?”
This is a core idea behind many modern applications.
Retrieval Augmented Generation (RAG)
In Retrieval-Augmented Generation (RAG), Large Language Models (LLMs) are combined with a search component that retrieves relevant information before generating an answer.
Instead of relying solely on what the model has memorised, RAG first searches through a knowledge base (e.g. documents, articles, or embeddings), retrieves the most relevant pieces, and then generates a response based on those.
Recommended system
Recommender systems are another great example of search in action.
Given a specific user or item, the goal is to find similar users or products — and use those similarities to make personalised recommendations. For example:
- Suggesting new movies based on ones a user has liked
- Recommending products that are similar to what others with similar tastes have purchased
- Suggesting articles or playlists that match a user’s interests
In essence, you’re searching through the dataset to find relevant matches — either by user profile, item profile, or both.
Generative AI
Generative AI: generating a syntatic sample based on existing data.
One of the most mind blowing/exciting/controversial developments in modern AI is the ability to generate synthetic data based on real-world data — more commonly known today as generative AI (Gen AI).
At its core, the idea is surprisingly simple: You train a model on real data so that it learns the underlying distribution. Then, you use that model to generate new samples that are statistically similar to the original data. And voilà — suddenly you’ve got an image of a panda doing a kickflip in the clouds.
Image generation
Tools like Midjourney, DALL·E, and Stable Diffusion are leading examples of deep learning models capable of generating high-quality images. These models go beyond simply producing synthetic data — they allow you to guide the generation process using a text prompt. Whilst the output might not always be exactly what you imagined, it’s often visually impressive and creatively rich — and it’s getting better all the time.
Synthetic datasets
Not all generative use cases are about creativity. In many industries, data privacy is a major concern. Real-world datasets can contain sensitive or personally identifiable information, which makes sharing or reusing them risky.
To address this, organisations may use generative models to create synthetic datasets — artificial data that preserves the statistical properties of the original, but does not expose real individuals.
This allows teams to:
- Share data with third parties safely
- Build and test models without risking privacy
- Comply with GDPR and other data protection regulations
Done well, synthetic data can enable innovation without compromising trust.
Anomaly detection
Anomaly detection: Find odd cases.
In anomaly detection, the goal is to identify instances that behave differently from the norm.
This technique is commonly used in scenarios such as:
Fraud detection
When someone gains unauthorised access to a bank account, you want to detect and flag unusual behaviour as early as possible.
Predictive maintenance
It's far better to detect early signs of failure — for example, in a ship's engine — and replace the motor while docked in the harbour, rather than waiting for it to break down in the middle of the ocean.
Network intrusion detection
In cybersecurity, anomaly detection is used to identify unusual network activity that could indicate a hacking attempt, malware infection, or unauthorised access. For example, a sudden spike in data traffic or login attempts from an unusual location might trigger an alert.
Manufacturing quality control
In automated manufacturing, sensors collect data on temperature, pressure, weight, etc. Anomaly detection can identify defective products or irregular machine behaviour, helping prevent faulty batches and reduce downtime.
Forecasting
When your data has a direction or sequence over time, it’s often useful — or even essential — to try and predict what comes next.
This task is known as forecasting, and it appears in many forms across data science and machine learning. It being: estimate stock prices, generate the next sentence in a paragraph, or simulate what happens in a video; you're essentially trying to extrapolate a sequence into the future.
Stock prediction
Ah yes: stock prices. The dream of building a money-printing machine. It’s something many people want to do — and something I get asked about almost on a monthly bases.
Stock prices are a classic example of forecasting — and a notoriously difficult one. You have time series data of stock prices, volume, and potentially other market indicators, and the goal is to predict what the next value (or set of values) will be.
Whilst forecasting markets is extremely challenging due to noise, randomness, external influences and competition of milions of others who want to do the exact same thing — ML models (including recurrent and attention-based networks) are commonly used in algorithmic trading and financial risk analysis.
Text generation
A sentence is just a sequence of words. Tools like ChatGPT, Gemini, Mistral, Claude, DeepSeek, and LLaMA are all examples of large language models (LLMs) that specialise in predicting the next word.
They are trained on huge corpora of text and learn to model the probability of the next token given the previous ones.
Video generation
One of the latest developments in generative AI is video generation.
Just like a sentence is a sequence of words, a video is a sequence of images (frames). So in principle, generating a video is simply a matter of extrapolating that sequence over time.
While the technology is still evolving, recent advances have made it possible to create short video clips from text prompts or initial frames — with increasingly realistic results. It’s an exciting and fast-moving area, combining deep learning, computer vision, and generative modelling.
Content focus of the course
Artificial intelligence is not a standalone field. It's built on a rich stack of disciplines:
Advanced AI systems are built on top of vast foundational domains.
- Mathematics — about reasoning, structure, and logic.
- Statistics — about relationships, variation, and probability.
- Machine Learning — about discovering patterns and making decisions.
- Deep Learning — about extracting complex features from data.
- Generative AI — about modeling knowledge, efficiency and automating creativity.
- Some foundational mathematics to sharpen your reasoning.
- A solid amount of statistics to understand data and uncertainty.
- Extensive exploration of machine learning techniques and patterns.
- A touch of deep learning to spark your curiosity for more.
The scope of the course
This is an machine learning advanced course designed to teach you deeper underlying aspects of building predictive models.
We’ll focus on tabular data (as can be found in a Excel/SQL-style tables).
This means we won’t be building the next ChatGPT in this course — first, you need to learn to walk before you can learn to run.
Here, you’ll build a rock-solid foundation in Machine Learning.
We’ll train models from scratch, starting with raw data. The main emphasis is on:
- Training Machine Learning models for a variety of applications
- Evaluating models thoroughly so you understand exactly why they perform the way they do.
- Fine-tuning models to squeeze out the best possible performance.
- Applying essential statistical analysis to keep your insights grounded in reality.
While subjects like programming and visualisation will be covered at a basic level (to give you the starting point you need).
Teaching method
This is an in-depth course for people who have at least some experience with machine learning or data science.
Our approach is top-down, guided by intuition and purpose.
We start by explaining why we want to apply a certain technique, then move on to how to do it, diving into the underlying fundamentals along the way.
You decide how deep you want to go. If you prefer, you can skip the math sections now and return to them when you’re ready.
Throughout, we’ll use real-world datasets, ensuring what you learn is practical and directly applicable.
This course balances use cases, theory, visualizations, and code — giving you a complete toolkit to truly understand and build.
This content is part of the Foundational Machine Learning course.
Enroll to access