Conditional misclassification risk 2026-10-05
For a random classifier determined by training information , and an independent test pair , its conditional misclassification risk is . It is itself a training-dependent random variable. The tower property of conditional expectation gives .
Empirical misclassification risk Created 2026-09-29 Updated 2026-10-05
On labelled examples , the empirical misclassification risk isAn empirical risk minimizer chooses a classifier attaining the smallest value over its hypothesis class.
Kernel trick Created 2026-09-24 Updated 2026-10-14
The kernel trick evaluates inner products of feature map outputs through without explicitly constructing those vectors. An algorithm expressed entirely through these inner products can therefore operate on nonlinear derived coordinates using only evaluations of a positive-semidefinite kernel on the original inputs. A classifier linear in the derived coordinates can have a nonlinear boundary in the original coordinates.
The polynomial kernel gives a finite, fully visible example: corresponds to . The XOR separation by a product feature below makes the interaction coordinate useful, while dual prediction with a kernel shows how to predict without calculating it explicitly.
An arbitrary score called a similarity need not be a positive-semidefinite kernel. Symmetry alone, even with nonnegative entries, is insufficient: the symmetric matrixhas for , so it cannot be a Gram matrix of real inner products. A positive-semidefinite kernel requires a positive semidefinite matrix for every finite choice of inputs, not just the observed training data.[ref]
Gaussian Processes for Machine Learning by Carl Edward Rasmussen and Christopher K. I. Williams. Section 4.1, p. 80: Gram matrices, quadratic-form definition of positive semidefiniteness, and nonnegative eigenvalues
The existing Moore-Aronszajn theorem connects this requirement to a Reproducing kernel Hilbert space; this example needs only finite linear algebra. Misclassification loss Created 2026-09-29 Updated 2026-10-03
For a classifier and a labelled example , the misclassification loss isIt is also called zero-one loss because it is zero for a correct prediction and one for an incorrect prediction.
Misclassification risk 2026-09-29
One-nearest-neighbour classifier Created 2026-10-05 Updated 2026-10-14
The classifier that assigns the query the label of its closest training feature, using feature-measurable nearest-neighbour tie-breaking. Its misclassification risk need not converge to Bayes risk, even with infinitely many independent and identically distributed random variables as training data.
Past exam of the mathematics course of the University of Cambridge 2017 iii Paper 210 2 Solution Created 2026-10-03 Updated 2026-10-05
Choose a Borel measurable function version of the posterior success probability . Conditional on , predicting zero has error probability and predicting one has error probability . A Bayes classifier for zero-one loss is thereforeEither decision is optimal when . The displayed Bayes risk also equals and is unaffected by changing on a -null set.
For any measurable set , independence and the uniform distribution of giveLikewise the probability with label zero is . These sets determine the joint probability distribution, soThe same construction makes all training pairs independent and identically distributed random variables.
Fix a feature-measurable nearest-neighbour tie-breaking rule, for example increasing original index for observations at equal Euclidean norm distance from the query. This is important: the ordering may depend on the features, but not on the or labels. Let be the label attached to the th ordered feature. The classifier from the K-nearest neighbors algorithm isThe displayed rule resolves a tied vote in favour of one; any fixed vote convention would also define the method. When , this is the one-nearest-neighbour classifier .
Write for the selected original index. Conditional on all features , it is fixed, and is still uniform on . The two decisions being compared areThe latter is an oracle comparison rule: its relabeling is recomputed at each query , rather than being a fixed relabeling of the training data for all queries. For a variable with the uniform distribution on , the two threshold indicators at differ exactly when lies between them, an interval of length . This Bernoulli coupling by a shared uniform random variable proves
Take the test pair independent of the training data and its auxiliary uniforms. Let , and interpret as conditional misclassification risk given . The tower property of conditional expectation gives . Conditional on the test feature and all training features, and are independent variables with a Bernoulli distribution of parameter . Consequently, for every ,This is an exact finite-sample equality, not merely a limit.
The two error indicators can differ only if the two classifiers disagree, soThe permitted nearest-neighbour approximation theorem states that the last expected value tends to zero for the feature-based selection rule. This establishes the one-nearest-neighbour asymptotic risk
For , put . Then , and . Integrating gives the Bayes risk bound for one-nearest-neighbour classificationThus a one-nearest-neighbour classifier need not achieve the Bayes risk: for constant , its limiting misclassification risk is , while .
Feature-based neighbour tie-breaking is required. The convention cannot be dropped for arbitrary . For a counterexample, take almost surely and constant , and choose among the coincident neighbours the one with the smallest . Then the predicted label is one with probability , so its misclassification risk tends to , exceeding the claimed upper bound . The corrected theorem uses ties determined independently of the uniforms and labels, as above.
Training data 2026-10-05
The observations used to construct a classifier or other fitted rule. For a random fitted classifier, its conditional misclassification risk conditions on these observations and evaluates an independent test pair. Auxiliary randomization used in fitting belongs to the conditioning information as well.
XOR separation by a product feature 2026-10-14
Give the four corners of the square the exclusive or labels: when the input signs differ and when they agree. In the following order,No affine function has the required strictly positive scores at and strictly negative scores at : both pairs have midpoint zero, so would have to be both positive and negative. This also rules out perfect classification by a single threshold with a consistent tie rule.
Under the polynomial kernel's quadratic feature map, the two classes become two distinct vectors:The hyperplane separates them. With and , the score and classifier areAll four signed scores equal one. In the input plane the boundary is , the union of the coordinate axes; in the derived coordinates it is a single hyperplane. The feature map identifies opposite corners, which is harmless for these labels because opposite corners belong to the same class. A fixed feature map would not separate labels that disagree at identical mapped vectors.
XOR labels in the input square and the quadratic feature slice
. The dashed diagonals join equal-label input pairs and share their midpoint, obstructing affine separation. In the feature panel all mapped points have third coordinate one; the two coincident pairs are separated by the horizontal hyperplane at second coordinate zero. Details.