MMOOZZGG.com

Glossary

Regression in machine learning

In short

Regression is a machine learning task in which a model predicts a number: a price, demand, a delivery time or fuel use.

Machine learning · regression

MMOOZZGG.com editorsChecked: 1 min read

For a child

Imagine that every week you measure how much the flower on the windowsill has grown and draw dots on a sheet of paper. The dots line up almost in a line. If you continue this line, you can guess how tall the flower will be in a month. A computer can do the same: it looks at past dots and names the number that comes next.

In plain words

Here the model answers the question “how much?”. It gets the features of an object, such as the floor area of an apartment, the floor, the district and the year of construction, and returns a number: the expected price. To learn, it studies thousands of past deals and works out how each feature affects the result. The answer almost never matches reality exactly, so what matters is how much the model errs on average. The same method estimates a taxi trip time, the number of calls to a call center tomorrow, or the power use of a workshop.

For business

Companies use these models wherever a decision depends on a number: how much stock to order, what price to set, when a client will pay an invoice, how many operators to put on a shift. The money comes not from the formula but from forecast accuracy: an error in purchasing turns into surplus stock or empty shelves. The project cost depends on the length and cleanliness of the history and on the number of factors to collect from the 1C accounting system, the CRM and outside sources. The risks: the model works poorly after sharp market changes and silently errs on new products with no history. Compare its error with a simple rule such as “same as last month”, and only then decide whether to put it into use.

For a specialist

Regression is a supervised learning task with a continuous target variable. Ordinary least squares fits the weights of a linear model by minimizing the sum of squared residuals. Regularization adds a penalty: L2 in Ridge regression shrinks the coefficients and makes them more stable under multicollinearity, while L1 in Lasso sets some coefficients to zero and works as feature selection. Trees, gradient boosting, neural networks and Gaussian processes capture nonlinear relationships, and quantile regression estimates a chosen quantile instead of the mean. Logistic regression, despite its name, solves a classification task. The metrics are mean absolute error (MAE), mean squared error (MSE) and its root (RMSE), mean absolute percentage error (MAPE), and the coefficient of determination R². For time series, test only on later periods, or the estimate will be too high.

Example

A coffee shop chain forecasts how much milk each location will need tomorrow. The model takes into account the day of the week, the weather and the sales of past weeks, and the manager gets a ready figure for the order.

Related terms

Questions and answers

How is regression different from classification? Regression predicts a number, such as a price or a term. Classification picks one option from a list, such as “will pay” or “will not pay”.
How do you know a regression model works well? Look at how much it errs on average on data it did not see in training. Then compare this error with a simple rule such as “same as last year”: if the model does not beat it, it is too early to put it into use.

Sources

Not sure whether your company needs this?

AI solutions map
Contact us