Machine Learning Explained: Types and Limits
Machine learning is the part of AI where software improves from examples instead of following rules a person wrote by hand.
In this guide
Traditional software encodes logic: if this, then that. Machine learning flips the direction. You supply examples of inputs and desired outputs, and an algorithm searches for a rule that reproduces the pattern well enough to generalise to cases it has never seen.
That shift is powerful and easy to overstate. A model can only learn what its data and its objective allow, and a model that looks excellent in testing can fail quietly in the real world.
The main types of machine learning
Most practical work falls into three families. Supervised learning uses labelled examples to predict a category or a number. Unsupervised learning looks for structure without labels. Reinforcement learning trains an agent by rewarding behaviour over many attempts.
In between sit self-supervised methods, which generate their own labels from raw data and power most modern language and vision models, and semi-supervised methods that combine a small labelled set with a large unlabelled one.
- Supervised: spam detection, credit risk scoring, defect detection, price prediction.
- Unsupervised: customer segmentation, anomaly detection, topic discovery, compression.
- Reinforcement: game playing, robot control, recommendation policies, scheduling.
- Self-supervised: language models, image encoders, speech representations.
How a model is trained and evaluated
Training needs features, a target and a loss function that measures how wrong the model is. An optimiser repeatedly nudges the parameters to reduce that loss. The danger is memorising the training set instead of learning the underlying pattern, which is called overfitting.
The defence is honest evaluation: hold out data the model never sees, validate choices on a separate split, and report metrics that match the real cost of mistakes. Accuracy is misleading when one class dominates, so precision, recall and calibration often matter more.
Where machine learning earns its keep
The strongest applications repeat at volume and tolerate some error. Sorting email, flagging unusual transactions, forecasting demand, prioritising support tickets, reading scanned documents and spotting defects on a production line all fit that description.
Fields where every decision is unique and consequences are severe, such as sentencing or diagnosis without oversight, demand far more caution. There the model becomes an assistant whose output is checked, not an authority.
Why machine learning projects fail
The usual cause is not the algorithm. It is the data: too little of it, labels that disagree with each other, or a training set that does not resemble live traffic. The second most common cause is drift, where the world changes and the model silently keeps predicting the old one.
Successful teams start with a baseline they can beat, such as a simple rule or a human process, and only move to a complex model when the simpler version has been measured and beaten.
- Define the decision the model supports before choosing any algorithm.
- Audit labels: who created them, how consistently, and with what bias.
- Monitor live inputs and outputs after launch, not just at training time.
- Keep a simple baseline so improvements are provable.
- Plan for retraining and for the day the model must be switched off.
Key facts at a glance
Frequently asked questions
Is machine learning the same as AI?
No. AI is the broader goal of intelligent behaviour. Machine learning is one way to get there, by learning from data, and it is currently the dominant approach.
How much data does a model need?
It depends on the problem's complexity and the signal in the data. Simple tabular problems can work with thousands of rows, while image and language models often need millions of examples or a pretrained model to start from.
What is overfitting in plain language?
It is when a model learns the specific training examples too closely, including their noise, so it performs well on data it has seen and poorly on anything new.