Machine learning
Intermediate
What you need first. Nothing else on this path comes first. This page is part of Statistical learning.
In statistical learning, machine learning is the estimation of a prediction or description rule from data, separating error a better rule could remove from error the measured features cannot remove. A rule that predicts a later case from earlier cases, or that describes how those cases are arranged, is the object of statistical learning. Machine learning, in that statistical sense, is this enterprise: estimate the rule from data, and keep separate the error that a better rule could still remove from the error that the measured features cannot remove. The same activity is one of the places where statistics meets artificial intelligence. Hastie, Tibshirani, and Friedman put the science of learning in statistics, data mining, and artificial intelligence at once, and they treat neural networks as a class of models developed separately in statistics and in artificial intelligence from essentially the same idea: linear combinations of the inputs, then a nonlinear function of those combinations. [1] [2]
Machine learning
| Fact | Value |
|---|---|
| Topic | Statistical learning |
| Listed on | Statistical learning |
| Worked example | 1 |
Motivating example
A laboratory can measure several properties of a blood sample and cannot, without exposing the patient, see whether a drug will cause a severe reaction. The measured properties are the inputs. The reaction is the output. A fitted rule takes the properties and returns a predicted risk. Even a perfect version of the rule, one that used the true dependence of risk on the measured properties, would still miss. The reaction also depends on things the sample did not record. The fitted rule’s extra miss, beyond that floor, is the part a different fit might shrink. [1]
Definition
Statistical learning is a set of approaches for estimating a function in a relationship such as . Machine learning, as the term is used for that activity, is the same project described with inputs , an output , and a learner fitted on a training set in which both are seen, or on features alone when no output is seen. In the statistical literature the inputs are called predictors, or classically the independent variables. In the pattern-recognition literature they are called features. The outputs are the responses. The wording differs. The split between what is measured and what is predicted does not. [1] [2]
Two purposes are usual. In prediction, is expensive or delayed, is in hand, and the forecast is . The accuracy of that forecast splits, for squared error with and held fixed, as
The first term is reducible error. The second is irreducible error, the variance of the remainder, which does not depend on how was chosen. In inference, the form of is the object: which inputs are associated with , and whether a straight line is enough. A flexible estimate can follow the sample more closely and can also follow noise that will not recur. [1]
The problems divide again into supervised learning, where each training case has a response, and unsupervised learning, where the task is to describe the features. A qualitative response makes the supervised problem a classification. A quantitative response makes it regression. Hastie, Tibshirani, and Friedman’s additive model , with independent of , is the statistical model underneath the squared-error split: is then the conditional mean. [2] [1]
Interpretation
Assume with , and hold both and fixed, so that the only randomness left in the squared error is . Expanding the square gives
because the cross term contains a factor . If and , the reducible term is . If , the expected squared error equals . If instead , the reducible term is and the expected squared error equals , the irreducible floor. Replacing and by and , with , gives reducible error and expected squared error equals . [1]
The split is an expectation at a fixed input and a fixed fit. It is not the gap between a training error and a test error on one sample, and it is not a statement about classification error. A training error of zero does not imply that the reducible error is zero. The identity scores a new response at a fixed . Equation (2.3) assumes additive noise with mean zero, and it holds and fixed. If the fit was computed from data that include the response being predicted, the cross term need not vanish. If the loss is a misclassification count rather than a square, the split into a squared gap and a noise variance is a different result. The irreducible piece can also contain features that were simply never measured. Improving does not recover them. [1] [2]
Choose the estimate of according to the purpose. A campaign that only needs to know who will respond can treat as a black box. A scientific question about which measurements move the response cannot: the form of has to be readable. Flexible tools, including trees, support vector machines, and neural networks, buy a wider class of functions and give up a simple reading. They do not automatically buy a smaller prediction error. Overfitting is the name for a flexible fit that has made the reducible error worse on new cases by chasing the sample. The most flexible procedure is not always the best predictor. A less flexible can have a smaller value of on new draws because it varies less from sample to sample. [1]
Worked example
Take , and , with and fixed and . The reducible error is . The irreducible error is . The expected squared prediction error equals . A fit that recovered exactly would have expected squared error , not .
Your turn. Now take , and , again with the fit and the input fixed. What is the expected squared error?
The reducible term is . Added to the irreducible term , the expected squared error equals .
Connections
Supervised learning and unsupervised learning are the two main organisations of problems. Classification is the supervised problem with a qualitative response. Cluster analysis and dimensionality reduction are unsupervised summaries. The training set is the sample the learner is allowed to use, and overfitting is what a comparison of training error with later error is designed to catch. Artificial intelligence, in the sense Hastie, Tibshirani, and Friedman use when they introduce neural networks, is one of the fields in which those same input–output models were built, alongside the statistical development of projection pursuit and related smoothers. The statistical account is the function , the loss, and the split of error into a part the fit can still reduce and a part it cannot. [1] [2]
Check yourself
Try these questions before opening an answer.
Reducible plus irreducible
A fixed fit has f(X)=10, f-hat(X)=7 and error variance 9. What is the expected squared error?
The expected squared error is 18.
Perfect fit
If that same fit recovers f(X)=10 exactly, and the error variance is still 9, what is the expected squared error?
The expected squared error is 9.
Another fixed fit
Now f(X)=4, f-hat(X)=1 and the error variance is 4. What is the expected squared error?
The expected squared error is 13.
History
Least squares, at the beginning of the nineteenth century, is the oldest of these fitting rules, built for a quantitative response and first applied in astronomy. Linear discriminant analysis, in 1936, and logistic regression, in the 1940s, extended the project to qualitative responses. The generalised linear model, in the early 1970s, collected linear and logistic regression as special cases. By the 1980s, computation had made nonlinear fits practical: classification and regression trees, generalised additive models, and neural networks. Support vector machines followed in the 1990s. Statistical learning became the name of the subfield concerned with supervised and unsupervised modelling and prediction. The Elements of Statistical Learning is the account of the more mathematical development of the same material, written for readers in statistics and also for readers in artificial intelligence. Neural networks are the chapter in which that overlap is sharpest: one family of models, two histories, the same extracted features. [1] [2]
See also
Line chart · Apriori algorithm · Asymptotic analysis · Average treatment effect · Base rate · Bayesian inference · Bayesian model · Bayesian probability
References
- ^ a b c d e f g h i j a. (Ch. 2, pp. 17–19, (2.3)) b. (Ch. 2, pp. 17–19) c. (Ch. 2, p. 17) d. (Ch. 2, pp. 17–20, (2.3)) e. (Ch. 2, pp. 26–29) f. (Ch. 2, p. 19, (2.3)) g. (Ch. 2, pp. 18–19, (2.3)) h. (Ch. 2, pp. 17–26) i. (Ch. 2, pp. 26–29) j. (Ch. 1, pp. 6–7) James, G., Witten, D., Hastie, T. & Tibshirani, R. (2021). An Introduction to Statistical Learning: with Applications in R (2nd ed.). Springer, New York. https://doi.org/10.1007/978-1-0716-1418-1
- ^ a b c d e f a. (p. 1; Ch. 11, §11.1, p. 389) b. (Ch. 2, §2.1, p. 9) c. (Ch. 2, §2.6.1, pp. 28–29) d. (Ch. 2, §2.6.1, p. 28) e. (Ch. 11, §11.1, p. 389; Ch. 2, §2.1, p. 9) f. (p. 1; Ch. 11, §11.1, p. 389) Hastie, T., Tibshirani, R. & Friedman, J. (2009). The Elements of Statistical Learning. Springer. https://doi.org/10.1007/978-0-387-84858-7
Cite this page
StatWiki (2026). "Machine learning." StatWiki. Last updated 2 December 2026. https://www.statwiki.io/articles/machine-learning.html
@misc{statwiki_machine_learning,
author = {{StatWiki}},
title = {{Machine learning}},
year = {2026},
url = {https://www.statwiki.io/articles/machine-learning.html},
urldate = {2026-12-02},
note = {StatWiki, last updated 2 December 2026}
}