Concept Architecture
Regression Task in AI Methods for Evidence
A regression task is the kind of machine learning job where the answer for each item is a quantity on a numerical scale, not a category. In health economics the quantity is usually something a decision model needs, such as a patient's annual hospital cost, a utility value on the EQ-5D scale or the length of a hospital stay. NICE ECD20 (2026), the NICE framework on AI methods for evidence, separates regression tasks from classification tasks and asks that each be judged with metrics that suit it, naming mean squared error and mean absolute error for regression. A predicted number can be wrong by a little or by a lot, and the size and direction of those errors decide whether the predictions are safe to carry into a cost-effectiveness analysis or a budget.
A numerical response and the origin of the name
James and colleagues sort variables into quantitative ones, which take numerical values such as age or income, and qualitative ones, which fall into one of K classes. Problems with a quantitative response are called regression problems and those with a qualitative response classification problems, although they note that the line is not always crisp. Their example is logistic regression, a classification method despite its name, whose class probabilities also let it be seen as regression. The inputs, called predictors, features or covariates, can be of either kind.
The word itself comes from Francis Galton, who in 1886 reported that the deviation of a child's height from the population average was, on average, two-thirds of the deviation of the mid-parent height. He called this regression towards mediocrity. Present-day regression tasks need not involve any pull towards an average, and the word now covers linear regression, regression analysis and the machine learning task alike.
James and colleagues also separate two reasons for fitting such a model. For prediction the fitted function can be treated as a black box as long as its predictions are accurate, while for inference its exact form matters because the aim is to learn which predictors are associated with the response and how. A regression task in the ECD20 sense is a prediction job, judged on items the model has not seen, whereas much regression analysis in health economics estimates treatment effects or adjusts comparisons, where the coefficients are the result.
Regression tasks in health economic evidence
Predicting healthcare costs is the classic case. Jones and colleagues list cost regressions used in insurance risk adjustment, in setting provider budgets and in identifying treatment costs for health technology assessments, and a model that predicts each patient's annual cost from real-world data is the same kind of task.
Utility prediction is the other common case. A mapping function predicts a health state utility value from scores on a clinical or non-preference-based measure, so that QALYs can be estimated when the trial did not collect EQ-5D. Its output is bounded and often lumpy, which the mapping study page treats in detail.
ECD20 treats prediction from structured data as part of primary evidence generation. The models it lists for this work include transparent linear and logistic regression and less transparent gradient boosting, random forests, support vector machines and neural networks, the family behind deep learning in health. ECD20 accepts such non-generative models once properly validated, asks for the model choice to be justified and for interpretability measures such as SHAP or LIME to be reported, and prefers low-complexity models with documented coefficients over opaque models where that is feasible. Its introduction adds that the coefficients of a linear model can be read directly and that the same data give the same linear model every time.
Two nearby uses that output numbers are handled in other parts of ECD20. When a large language model pulls a mean cost or a hazard ratio out of a paper, ECD20 scores the extraction as concordant or discordant with the source, which is a classification frame, even though the item extracted is a number. When generative AI suggests starting values for the inputs of a health economic model, ECD20 allows it only as a support tool with a person overseeing it closely, and suggestions should not be substituted into the model automatically.
Error measures for numerical predictions
ECD20 asks that AI uses be evaluated, where possible, by the predictive task underneath them and names mean squared error and mean absolute error as the regression metrics. Both start from the prediction error for each item, the observed value minus the predicted value. Each measure has its own page, mean squared error, mean absolute error and root mean square error, and reading them side by side shows what each one misses.
where is the number of items in the evaluation set, is the observed value for item , is the model's prediction for item , is the mean squared error, is the mean absolute error and is the mean prediction error. The root mean square error is the square root of and is on the scale of the outcome.
Jones and colleagues compared regression methods for NHS hospital costs with all three. They describe the mean prediction error as a measure of bias at an aggregate level, where positive and negative errors cancel, the mean absolute error as a measure of the accuracy of individual predictions and the root mean square error as a measure of goodness of fit in which large errors count for more because they are squared. No model performed best on every metric.
The aggregate bias deserves weight in economic evaluation. Thompson and Barber argue that the arithmetic mean is the informative measure for cost data, because a decision maker needs the total budget for all patients and that total is the mean multiplied by the number treated. A model can rank better than a rival on mean absolute error while predicting a mean much further from the true one, so a regression task whose output feeds a decision model needs the mean prediction error reported next to any accuracy measure. ECD20 asks for metrics to be pre-specified and for it to be clear which metrics drive decisions and which are reported for information only.
Training error, test error and independent data
James and colleagues show that mean squared error computed on the data used to fit a model, the training error, falls steadily as a model becomes more flexible, while the error on new observations first falls and then rises. A model with small training error and large test error is overfitting, picking up patterns caused by chance. The bias-variance tradeoff page explains the U shape behind this.
ECD20 requires every validation exercise to use independent datasets, drawn from a separate data collection or by resampling such as holdout or cross-validation, and asks for 95% confidence intervals alongside metrics when possible. Jones and colleagues worked the same way at scale, splitting 6,164,114 patients at random into an estimation set and a validation set of 3,082,057 each and judging every model on the validation half.
Worked example of two cost models for five patients
All numbers here are illustrative. A team predicts annual hospital cost in GBP for a subgroup whose predicted mean will enter a cost-effectiveness model. Five patients in the test set have observed costs of 200, 400, 600, 1,000 and 7,800, so the observed mean is 10,000/5 = 2,000. Model A predicts 300, 400, 500, 900 and 3,000. Model B predicts 900, 1,100, 1,300, 1,700 and 5,000.
| Patient | Observed | Model A | Error A | Model B | Error B |
|---|---|---|---|---|---|
| 1 | 200 | 300 | −100 | 900 | −700 |
| 2 | 400 | 400 | 0 | 1,100 | −700 |
| 3 | 600 | 500 | 100 | 1,300 | −700 |
| 4 | 1,000 | 900 | 100 | 1,700 | −700 |
| 5 | 7,800 | 3,000 | 4,800 | 5,000 | 2,800 |
1. Mean absolute error. For model A the absolute errors sum to 100 + 0 + 100 + 100 + 4,800 = 5,100, and 5,100/5 = 1,020. For model B they sum to 700 + 700 + 700 + 700 + 2,800 = 5,600, and 5,600/5 = 1,120. Model A looks better.
2. Mean squared error. For model A the squared errors sum to 10,000 + 0 + 10,000 + 10,000 + 23,040,000 = 23,070,000, and 23,070,000/5 = 4,614,000, a root mean square error of about 2,148. For model B they sum to 4 × 490,000 + 7,840,000 = 9,800,000, and 9,800,000/5 = 1,960,000, a root mean square error of 1,400. Model B looks better, because squaring punishes model A's large miss on patient 5.
3. Mean prediction error. For model A the signed errors sum to 4,900, and 4,900/5 = 980, so the predicted mean is 5,100/5 = 1,020 against an observed 2,000. For model B the errors sum to 4 × (−700) + 2,800 = 0, so its predicted mean is 10,000/5 = 2,000.
4. Interpretation. For a subgroup of 1,000 patients, model A implies a budget of GBP 1,020,000 and model B GBP 2,000,000, a gap of GBP 980,000. Model A tracks typical patients closely and misses the expensive one. Choosing on mean absolute error alone would nearly halve the cost per patient entering the decision model, while the mean prediction error exposes the bias at once.
Regression tasks beside classification, analysis and generation
In a Classification Task the model assigns a category and errors are counted in a Confusion Matrix. A regression task has errors of different sizes, so its metrics average distances, not counts. The same generalised linear model can serve as an inferential tool in a trial analysis or as a predictor in a regression task, and what changes is whether it is judged on new data. Generative AI can also output numbers, and ECD20 discusses such uses under the evidence activity they serve, such as data extraction or parameter estimation.
Where regression tasks mislead
Healthcare costs are hard to predict. Jones and colleagues describe them as non-negative, often with many zero values, heteroscedastic, positively skewed and leptokurtic, and in their comparison linear regression on log-transformed costs and gamma models with a log link were not among the four best performers on any metric. The skewness of the outcome is a reason to inspect errors by decile of predicted cost, as Jones and colleagues did, finding that the highest decile generally carried the largest absolute mean prediction error.
Performance in one setting may not hold in another. ECD20 asks that validation check whether performance degrades outside the original evaluation setting and across population subgroups, and warns of data contamination, where a model is tested on data it was trained on and appears better than it is. A low error measured in one health system or period says little about the bias a model carries into another.
Sources
- Galton F. Regression towards mediocrity in hereditary stature. Journal of the Anthropological Institute of Great Britain and Ireland. 1886;15:246-263. https://doi.org/10.2307/2841583
- James G, Witten D, Hastie T, Tibshirani R, Taylor J. An Introduction to Statistical Learning with Applications in Python. Cham: Springer; 2023. Sections 2.1.1, 2.1.5 and 2.2. https://www.statlearning.com/
- Jones AM, Lomas J, Moore PT, Rice N. A quasi-Monte-Carlo comparison of parametric and semiparametric regression methods for heavy-tailed and non-normal data: an application to healthcare costs. Journal of the Royal Statistical Society Series A. 2016;179(4):951-974. https://doi.org/10.1111/rssa.12141
- National Institute for Health and Care Excellence. AI methods for evidence framework (ECD20). Published 9 November 2026. Introduction, principles, primary evidence generation, evidence synthesis and health economic evaluation chapters, and Appendix A. https://www.nice.org.uk/corporate/ecd20
- Thompson SG, Barber JA. How should cost data in pragmatic randomised trials be analysed? BMJ. 2000;320(7243):1197-1200. https://doi.org/10.1136/bmj.320.7243.1197
Related Concepts (4)
Library
Publications
5
Exploring Heterogeneity in the Cost-Effectiveness of High-Flow Nasal Cannula Therapy in Acutely Ill Children: Insights From the Step-Up First-line Support for Assistance in Breathing in Children Trial Using a Machine Learning Method — Hattab Z, Moler-Zapata S, Doherty E, et al, Vol. 28, No. 1, pp. 60-69 ed., 2025 (Value in Health)
Uses causal forests on trial data to explore how cost-effectiveness varies between children.
Journal ArticleView source →Integrating decision modeling and machine learning to inform treatment stratification — Glynn D, Giardina J, Hatamyar J, et al, Vol. 33, No. 8, pp. 1772-1792 ed., 2024 (Health Economics)
Combines decision modelling with machine learning to build treatment rules that vary by patient characteristics.
Journal ArticleView source →Machine Learning Methods to Estimate Individualized Treatment Effects for Use in Health Technology Assessment — Zhang Y, Kreif N, GC VS, et al, Vol. 44, No. 7, pp. 756-769 ed., 2024 (Medical Decision Making)
Compares machine learning methods for individual treatment effects and asks which are fit for HTA use.
Journal ArticleView source →Real-World Evidence, Causal Inference, and Machine Learning — Crown WH, Vol. 22, No. 5, pp. 587-592 ed., 2019 (Value in Health)
Explains how machine learning can support causal inference from real world data used in HTA.
Journal ArticleView source →An examination of machine learning to map non-preference based patient reported outcome measures to health state utility values — Aghdaee M, Parkinson B, Sinha K, et al, Vol. 31, No. 8, pp. 1525-1557 ed., 2022 (Health Economics)
Tests machine learning against econometric mapping from non-preference PROMs to utility values.
Journal ArticleView source →
Frequently Asked Questions (6)
What is Regression Task?
A regression task is a machine learning job in which a model predicts a number, such as a patient's annual cost or a utility value, from input features.
Source: NICE ECD20 (2026)
Which error measures does NICE ECD20 name for judging AI that performs a regression task?
NICE ECD20 (2026) asks that AI uses be evaluated, where possible, by the predictive task underneath them, and it names mean squared error and mean absolute error as the metrics for regression tasks. The framework requires every validation exercise to use independent datasets, drawn from a separate data collection or by resampling such as holdout or cross-validation. Metrics should be pre-specified, with 95% confidence intervals reported alongside them when possible. The framework also asks for a clear statement of which metrics drive decisions and which are reported for information only, and for checks on whether performance degrades outside the original evaluation setting.
Source: NICE ECD20 (2026)
Why should a regression task that predicts costs for an economic evaluation report the mean prediction error?
Thompson and Barber argue that the arithmetic mean is the informative measure for cost data, because a decision maker needs the total budget for all patients treated, and that total is the mean cost multiplied by the number of patients. The mean prediction error averages the signed errors, so it shows how far the predicted mean sits from the observed mean. Mean absolute error describes the accuracy of individual predictions, and a model can rank better on it than a rival while its predicted mean sits much further from the observed mean. A cost model that tracks typical patients closely but misses the few very expensive ones can understate the budget by a wide margin.
Source: Thompson and Barber 2000
How does a regression task differ from regression analysis used to estimate treatment effects in health economics?
James and colleagues separate two reasons for fitting a model to a numerical response. For prediction the fitted function can be treated as a black box provided its predictions are accurate, while for inference its exact form matters because the aim is to learn which predictors are associated with the response and how. A regression task in the machine learning sense is a prediction job judged on observations the model has not seen. Much regression analysis in health economics instead estimates treatment effects or adjusts comparisons, where the coefficients are the result, so the same generalised linear model can serve either purpose.
Source: James et al. 2023
What did Jones and colleagues find when they compared methods for a regression task predicting NHS hospital costs?
Jones and colleagues split 6,164,114 patients at random into an estimation set and a validation set of 3,082,057 each and judged every method on the validation half. They treated the mean prediction error as a measure of aggregate bias, the mean absolute error as a measure of the accuracy of individual predictions and the root mean square error as a measure of fit that weights large errors more. No method performed best on every metric. Linear regression on log-transformed costs and gamma models with a log link were not among the four best performers on any metric, and the highest decile of predicted cost generally carried the largest absolute mean prediction error.
Source: Jones et al. 2016
Why is a regression task judged on test data rather than on the data used to train the model?
James and colleagues show that the mean squared error computed on the training data falls steadily as a model becomes more flexible, while the error on new observations first falls and then rises in a U shape. A model with a small training error and a large test error is overfitting, picking up patterns caused by chance that do not exist in new data. The training error therefore flatters a model and says little about how well it will predict for new patients. A fair estimate needs observations that played no part in fitting, such as a held-out test set or the folds of cross-validation.
Source: James et al. 2023
Trust Record
Verified by Dr Darrin Baines
British health economist
Professional identity: darrinbaines.org
Verification date: 10 Nov 2026
Content version: 1.0.0
Canonical Identity
- Persistent URI
- https://healtheconomics.wiki/concept/regression-task
- Term code
- HS-HP-DH-104
Stable URI · Machine-readable · Resolvable · CC BY 4.0
