Prediction

In machine learning, a prediction is a model's output for a given input, such as a category, a number or the next word, whether or not it concerns the future.

In everyday speech a prediction is a claim about the future. In machine learning the word is broader: it is simply what a model outputs. Google's machine learning glossary gives examples. A binary classification model predicts one of two classes, such as spam or not spam. A multi-class model predicts one class from several. A linear regression model predicts a number. A model that labels a photo as a cat is making a prediction, even though nothing about the future is involved.

Large language models are predictors too. They are trained to predict the next token in a sequence, and when they generate text they make one prediction, add it to the text, and then predict again based on what they have already written. A long answer from a chatbot is a chain of thousands of such predictions.

Predictions usually come with a measure of confidence. A classifier might give a photo an 85 per cent chance of being a dog, 13 per cent cat and 2 per cent horse. Turning that into a decision means choosing a threshold, and where to set it is a business choice: a fraud system that flags anything above 50 per cent will catch more fraud and annoy more honest customers than one set at 90 per cent.

A good prediction is not the same as a good decision. In Against Predictive Optimization, Angelina Wang, Sayash Kapoor, Solon Barocas and Arvind Narayanan reviewed 387 reports, articles and web pages to find systems that predict outcomes for individuals and use those predictions to decide about them, such as pretrial risk scores and hiring tools. They found recurring flaws: the thing predicted often fails to measure the real goal, the data a model was trained on rarely matches where it is used, social outcomes are hard to predict, and people change their behaviour to game the system.

When a news story says an AI predicts disease, crime or job performance, three questions help: what exactly was predicted, how accuracy was measured, and on whose data. A model that predicts well on last year's patients at one hospital may not predict well on next year's patients at another.

Common questions

What is a prediction in machine learning?

It is the output a trained model produces for an input. Depending on the model, that can be a category, such as spam or not spam, a number, such as a house price, or the next word in a sentence. The term does not imply the output is about the future.

Why are large language models called next-word predictors?

Because that is what they are trained to do: given some text, predict the next token. When they generate an answer they repeat this step, each time predicting the next token based on everything written so far. The fluent text that results is built from those individual predictions.

Is prediction the same as forecasting?

Forecasting is one kind of prediction, focused on future values such as next month's sales or tomorrow's weather. In machine learning, prediction also covers outputs that have nothing to do with time, such as identifying an object in an image or classifying a document.

How accurate are AI predictions?

It depends entirely on the task, the data and how accuracy is measured. Models can be very accurate on inputs that resemble their training data and much worse on inputs that differ. Predictions about human behaviour, such as who will commit a crime or succeed in a job, are especially hard to make accurately.

Finding more

Search for "machine learning prediction", "classification threshold" or "predictive optimization" to understand how model outputs become decisions. Reliable sources include machine learning courses and glossaries from major providers, peer-reviewed studies that test models on new data, and academic work on algorithmic decision-making. Treat accuracy figures with care when they do not say what data the model was tested on.

Working out what this means for your business?

Aileron Shift builds the systems behind this site: AI newsrooms that research, write and publish on their own, marketing automation and WordPress hosting for companies that need to move faster than their competitors.