Regression
Regression is the task of predicting a number, such as a price or a temperature, from input data, and the family of statistical methods built for that task.
Machine learning problems split broadly into two kinds: predicting a category, which is classification, and predicting a number, which is regression. Google's machine learning glossary gives examples of regression models: one that predicts a house's value in euros, one that predicts a tree's life expectancy in years, and one that predicts how much rain will fall in a city over the next six hours.
In statistics, regression analysis means estimating the relationship between an outcome and the factors that may affect it. The outcome is called the dependent variable, or the label in machine learning; the factors are independent variables, predictors or features. The most common form is linear regression, which finds the straight line or flat surface that best fits the data. Ordinary least squares, the classic method, chooses the line that minimises the sum of squared differences between the data and the line.
The method is old. Wikipedia records that Legendre published the method of least squares in 1805 and Gauss in 1809, both using it to work out the orbits of comets from astronomical observations. The word regression came later, from Francis Galton in the 19th century, who used it for the way the children of tall parents tend to be closer to average height, a pattern now called regression towards the mean. Udny Yule and Karl Pearson later extended his work into the general statistical method.
Two details often confuse people. Not every model that outputs a number is a regression model: Google's glossary notes that a model predicting postal codes is really a classifier, because the numbers are labels. And logistic regression, despite its name, is usually used for classification, since it outputs a probability that is then turned into a category.
Regression powers a great deal of practical AI, from demand forecasting to pricing and risk scoring. Its limits are worth knowing: a regression reveals relationships within a particular dataset, and using it to predict new situations, or to claim that one thing causes another, needs a separate justification.
Regression predicts a number on a continuous scale, such as a price, a temperature or a delivery time. Classification predicts a category, such as spam or not spam, or which animal is in a photo. Many algorithms, including neural networks and decision trees, can be set up to do either. The name comes from Francis Galton, who in the 19th century studied how the children of tall parents tend to be closer to average height, a pattern he called regression towards the mean. The statistical method he helped develop kept the name even though it is now used for any kind of numerical prediction. It is mostly used for classification. Logistic regression outputs a probability between 0 and 1, and a system then turns that probability into a category, such as yes or no. The name reflects its mathematical roots in regression rather than how it is normally used. Not on its own. A regression shows how variables are related within a particular dataset. Claiming that one factor causes another requires a separate argument, such as a controlled experiment or a careful case for why the relationship is causal, especially when the data is observational.Common questions
What is the difference between regression and classification?
Why is it called regression?
Is logistic regression a regression or a classification method?
Does regression show cause and effect?
Search for "regression vs classification", "linear regression explained" or "regression analysis" to learn how numerical prediction works. Reliable sources include Google's Machine Learning Crash Course, introductory statistics textbooks and encyclopedia articles that cite them. When a study reports a regression result, check whether it claims prediction or causation, since the two need different kinds of evidence.Finding more
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.