ML Explained In 10 Minutes!

Machine learning gets tossed around like everyone already knows what it means. Most people know the word. Almost nobody knows the five types. Or where each one breaks.

Let's fix that.

Supervised learning

Supervised learning is the most common type. The idea is simple. You have inputs. You have labels. You show the model enough examples and it learns the mapping between them. You show a model a million examples. Cat. Not a cat. Cat. Cat. Definitely not a cat. And it learns the pattern. But how does it actually learn?

It guesses.

Then it checks how wrong the guess was, Then it adjusts, Then it guesses again. Like a student doing practice exams except it does ten million practice exams overnight and never complains. That number measures how wrong it is? That's called a loss function. The model's entire job is making that number smaller. So why does it ever go wrong? Because it only ever learned from your data. Specifically your data. From a specific point in time.

Here's the problem. The model doesn't learn the truth. It learns the patterns in your training data. If your data was collected in 2022, it knows 2022. Put it in production in 2026 and the world has moved. Customer behaviour changed. The market shifted, The model doesn't know, It keeps predicting confidently into a reality that no longer exists.

That's called distribution shift. It's the most common reason production models quietly degrade. And the model's confidence score won't tell you it's happening. But when your data is clean and your world is stable? Supervised learning is the most reliable tool in the entire field. It's well understood, well tested, and it works. Which is why it's still the default for almost every production ML system in existence.

a visual image of the different stages of Supervised Learning

Semi-supervised learning

Labelling data is expensive. A radiologist reviewing ten thousand scans. A lawyer tagging ten thousand documents. You might end up with a few hundred labelled examples and millions you never touched.

So what do you do with all that unlabelled data? Throw it away? Semi-supervised learning says no. The labelled data teaches the model what things are. The unlabelled data teaches it what the world looks like, the shape of the distribution, where the natural boundaries are. The model uses that structure as an additional signal.

Think of it like learning a language. Someone corrects you in a hundred sentences. But you also just live in the country, absorbing accents, slang, sentence rhythm, and the patterns of how people naturally speak.  The corrections are the labels. Everything you absorb just by being around the language is the unlabelled data. This works because of a core assumption: data points close together in the input space probably share the same label. 

The unlabelled data helps the model understand that space better. That assumption is the problem. Take the word "polvo." In Portuguese it means octopus. Spanish and Portuguese look similar, sound similar, share thousands of words.  If you speak Portuguese, it feels natural to assume the same word carries across into Spanish. But in Spanish, polvo means dust. And in Spanish slang it means something else entirely. I'll let you find that one out yourself.

The unlabelled data pointed you in completely the wrong direction. Not because the pattern wasn't real but because the assumption that similar-looking things share the same meaning just doesn't hold here.  It can actually push the model in the wrong direction by learning patterns that are not real.  The problem only becomes visible later, when something downstream fails. But when does the assumption hold? Semi-supervised learning lets you build models that would otherwise be impossible. You get the performance of a fully supervised model without the cost of labelling everything. In fields like medical imaging and speech recognition, it's not a nice-to-have. It's the only practical path forward.

A visual representation of labelled and unlabelled data points showing how AI learns patterns and creates boundaries from limited examples.

Un-Supervised Learning

No labels at all. 

You hand the model raw data and ask it to find structure on its own. No right answer. No wrong answer. Just what's in here?Imagine you give a computer a list of every restaurant in London. No cuisine. No categories. Just names, locations, prices, busy times, average order value. And you say: find the groups.

That's unsupervised learning.

It doesn't know what Italian means. It doesn't know what sushi is. It just sees numbers and patterns. So it finds them. Maybe it groups a pizza place in Soho with a sushi place in ChinaTown and a tapas bar in Angel. Not because they're all Asian or all European but because they're all mid-range, all busy on Friday nights. The computer found a real pattern. It just wasn't the pattern you expected. But here's the thing. It might also group every restaurant that starts with the letter I together.

Itsu. Iberica. Il Baretto.

Japanese. Spanish. Italian. Nothing in common except the first letter of their name. The algorithm found a pattern. It's a real pattern. It's completely useless And that’s the evaluation problem. The computer grouped those restaurants but it has no idea what that group means. It can't tell you why they're together. It just knows they're similar.

 You're the one who has to look at the cluster and figure out if it means anything at all. But that's also exactly what makes it powerful. Because sometimes you don't know what you're looking for. No predefined categories. No assumptions baked in. Just patterns the data already contains. That's how researchers discovered cancer subtypes nobody knew existed.  How companies found customer segments they'd never thought to define. Sometimes the most valuable insight is the one you weren't looking for.

AI discovering hidden patterns within unlabelled data

Anomaly Detection

Anomaly detection has one job. Learn what normal looks like. Flag everything that doesn't. Fraud detection.  Network intrusion. Manufacturing defects. Equipment failure before it happens. It's like a bouncer who's memorised every regular, the moment an unfamiliar face walks in, they get stopped. Simple enough.

So where does it break? The obvious problem: defining normal is harder than it sounds. You train on historical data. The model builds a picture of normal from that snapshot. Then something new appears in production. A new product. A seasonal spike. A system change. The model has never seen it. It looks anomalous. It isn't.

Your detector can't tell the difference between a genuine threat and something that's simply new. Both look identical from the model's perspective And then there's class imbalance. Real anomalies are rare by definition. One fraud transaction in ten thousand legitimate ones. A model that predicts normal every single time is 99.99% accurate and completely useless. You have to actively correct for this or the math works against you.

Get it wrong in either direction and you either miss real threats or generate so many false positives that your team stops trusting the alerts. Both outcomes are expensive But when it works, it works silently, constantly, at a scale no human team could match. Every transaction your bank approves in milliseconds. Every packet your network lets through. Anomaly detection is the reason entire categories of fraud, intrusion, and equipment failure get caught before anyone even notices they happened.

Potential fraudulent activity suspected

Reinforcement Learning

This one is completely different. No dataset. No labels. Nothing. Just an agent. An environment. And a reward signal.

The agent tries something. Gets rewarded if it works. Gets penalised if it didn't. Does this millions of times. Gradually figures out what works. It's the same way a toddler learns to walk. Nobody shows them a diagram. Nobody explains physics. They fall. They adjust. They fall again. Eventually they figure it out purely from feedback. The difference is the toddler has common sense. The agent doesn't. This is how AlphaGo became the best Go player in history.  How robots learn to walk. 

How recommendation systems learn to keep you watching. All of it learned this way from trying, failing, and adjusting and not from labelled examples. So what's the problem?

The reward function is the entire specification of what you want. And it has to be exactly right. The agent optimises it completely, without any understanding of your intent. There is no common sense. There is no implied goal. There is only the number. Just make the number bigger. OpenAI trained a boat racing agent to go fast. The agent discovered it could score more points by spinning in circles collecting regenerating bonuses than by finishing the race. The reward was specified correctly. The agent solved it correctly. The outcome was not what anyone wanted. That's called reward hacking. And it's not a rare edge case. 

Beyond that, RL needs massive amounts of experience to work. In simulation that's expensive but tractable. In the real world, those millions of failures have consequences. So you simulate. But the simulation is never a perfect replica of reality. Slightly different physics. Different latency. Different sensor noise. The policy trained in simulation hits the real environment and doesn't transfer.

But when all of that is solved? Reinforcement learning does things no other approach can. It beat the best Go player in the world. It's teaching robots to perform surgery. It learns strategies that nobody programmed, nobody anticipated, and nobody fully understands. That's either the most exciting thing in machine learning or the most terrifying. Probably both.

An AI agent learning through trial, error, and reward.

The five types.

Most people who use the word machine learning mean supervised learning. That's it. That's the whole thing they're picturing. Which means every time someone says "we'll just use AI for that", they're probably imagining one tool. Out of five. Each with completely different assumptions, Different failure modes, Different costs. The tool isn't the hard part. Knowing which tool and where it breaks,that's the hard part.

That's what separates someone who uses ML from someone who understands it.

The Big Five

Our closed beta is now Live. Sign up via the link below and keep being Evil

https://www.evilworks.com/evil-lair

Next
Next

Your jupyter notebook IS NOT production - Part 2: Testing