Machine learning is a branch of artificial intelligence in which computers learn to perform tasks from data instead of following rules written one by one by programmers. The term was popularised by the researcher Arthur Samuel in 1959, who built a program that improved at checkers by playing against itself. This guide offers machine learning explained without formulas.
Rules versus examples
Imagine building a spam filter. The traditional way, a programmer would write rules: if the email contains a certain word, mark it as spam. The problem is that scammers change their words all the time. With machine learning, we show the system thousands of emails already labelled as spam or not spam, and it works out the patterns that separate them on its own, including patterns nobody would have thought to write down.
The three main types of learning
Supervised learning: the model learns from examples that include the right answer, such as photos labelled cat or dog, or houses with their sale price. It then predicts the answer for new cases. It is the type most used in business.
Unsupervised learning: the model receives data without answers and looks for groups and patterns, for example to divide customers into similar buying profiles.
Reinforcement learning: the model learns by trial and error, receiving rewards when it gets things right. It is used in games, robotics and the fine-tuning of assistants such as ChatGPT.
How a model is trained
1. Collect and prepare the data: gather examples, fix errors and remove duplicates. This step usually takes most of the work.
2. Split the data: one part is used for training and another is kept aside to test whether the model works on data it has never seen.
3. Train: the algorithm adjusts its internal parameters to make fewer and fewer mistakes on the training examples.
4. Evaluate: the model is tested on the held-out data. If it does well in training and badly in testing, it has memorised the examples instead of learning, a problem called overfitting.
5. Deploy and monitor: the model goes into production and needs to be watched, because the world changes and new data can drift away from the old.
Neural networks and deep learning
Neural networks are models loosely inspired by how neurons work, made of layers of connected mathematical units. When there are many layers, we talk about deep learning. This approach drove the advances in image, speech and language recognition, and it is the basis of today's language models.
Everyday examples of machine learning
Series and product recommendations, credit card fraud detection, delivery time estimates in apps, machine translation, face recognition to unlock a phone and analysis of medical images.
Limitations and precautions
A model is only as good as the data it was trained on. Incomplete or biased data produces unfair decisions. Many models also work as black boxes that are hard to explain, which is a problem for decisions about credit, health or employment. That is why explainability, auditing and human oversight are essential parts of any serious project.
Keep going
Machine learning depends on well-prepared data. Read our guide to data analysis to understand that foundation, and our guide to how ChatGPT works to see a language model in action.