Machine learning (ML) is a way of building software that learns from examples instead of following rules that someone wrote out. Show it thousands of emails that people marked as spam or not spam, and it works out for itself what spam looks like. You meet it in everyday business software: a bookkeeping program that suggests how to book a bank payment, or a webshop that recommends products.
Where does the term come from?
The term is usually traced to Arthur Samuel of IBM, who used it in 1959 in the title of a paper about a checkers program. His program learned to play "a better game of checkers than can be played by the person who wrote the program", in 8 to 10 hours of playing time. Tom Mitchell of Carnegie Mellon University put it formally (2006): a machine learns when it "reliably improves its performance P at task T, following experience E".
How does it work?
A model is a formula with adjustable numbers, its parameters. IBM gives a house price example: price = A × floor area + B × number of rooms − C × age + a base price. Training searches for the values of A, B and C that best predict known sale prices. A loss function measures the error, and a method such as gradient descent adjusts the parameters step by step.
The aim is good predictions on new data. Google's Machine Learning Crash Course therefore keeps part of the data apart: a validation set to compare versions during development and a test set for the final check, for example 70% for training and 15% each for validation and testing. A model that scores well on its training data and badly on new data is overfitted. Deep learning, with neural networks of many layers, is one branch of machine learning.
Which kinds are there?
IBM distinguishes three ways of learning:
- Supervised learning: each example comes with the right answer, such as "spam" or a sale price. The model predicts a category or a number (classification or regression).
- Unsupervised learning: the examples have no answers, and the model finds groups or connections itself, which is used for market segmentation and product recommendations.
- Reinforcement learning: the model tries actions and gets rewards or penalties. Google names AlphaGo, which learned to play Go.
Large language models learn mainly through self-supervised learning, which IBM counts as a variant of supervised learning: words in a text are hidden, and the model predicts them.
Where does it go wrong?
- Without data it is the wrong tool. Rule 1 of Google's Rules of Machine Learning by Martin Zinkevich reads "Don't be afraid to launch a product without machine learning." If machine learning would give you a 100% boost, he writes, a simple rule of thumb gets you 50% of the way there.
- The model is a small part of the system. Google engineers Sculley et al. (2015) found that the ML code is only a small fraction of real-world ML systems. Building one is relatively fast and cheap, they write, and maintaining it is difficult and expensive, partly because the world outside keeps changing. That upkeep is the field of MLOps.
- A model copies the patterns in its data, including human biases. Google advises checking the training data and the predictions for bias before a model goes live.
Example
In November 2021 the bookkeeping software Xero rolled out machine learning predictions in its bank reconciliation. When a bank line matches no invoice, bank rule or earlier booking, a model suggests the contact and the account code, and the user clicks OK to accept. Xero explains that the model learned from millions of reconciled transactions: if many businesses book purchases from one office supplier as office equipment, it learns that link. In Mitchell's terms, the task is booking bank lines, the experience is earlier bookings, and the performance is how often a suggestion is right.
Sources
- IBM (Dave Bergmann): What is machine learning?Web
- Google: Machine Learning Crash CourseWeb
- Arthur L. Samuel: Some Studies in Machine Learning Using the Game of Checkers (IBM Journal, 1959)Web
- Tom M. Mitchell: The Discipline of Machine Learning (Carnegie Mellon University, 2006)Web
- Sculley et al. (Google): Hidden Technical Debt in Machine Learning Systems (NeurIPS 2015)Web
- Martin Zinkevich (Google): Rules of Machine Learning, best practices for ML engineeringWeb
