Canonical feature space of a positive-semidefinite kernel Created 2026-10-06 Updated 2026-10-14
On the finite formal span of symbols , define and extend bilinearly. For a positive-semidefinite kernel, the null vectors of this positive semidefinite bilinear form form its radical of a bilinear form. Quotienting by that linear subspace gives an inner product space and feature map with . This construction works for degenerate and zero kernels.
A real positive-semidefinite kernel satisfies . This follows from positivity of its two-point kernel matrix. If a diagonal value is zero, the corresponding off-diagonal values must also vanish.
Computational tradeoffs of the kernel trick 2026-10-14
For input coordinates, the homogeneous quadratic polynomial kernel has a weighted quadratic feature map with distinct monomials. Computing an inner product of already stored mapped vectors costs arithmetic operations, whereas costs using the input vectors. Here denotes big O notation. Higher fixed degrees can make the dimension gap much larger.
Sample count still matters. With training examples, materializing a dense kernel matrix stores numbers and requires distinct evaluations using symmetry. A dense direct solve for kernel ridge regression typically takes operations after constructing the kernel matrix, while a dual prediction with nonzero coefficients uses kernel evaluations. Explicit finite feature maps can be preferable when is small relative to , and a stored primal weight vector can make prediction depend on rather than on . The kernel trick by Ryan Giordano (sections Ridge regression and The polynomial kernel) explains the change from feature-coordinate equations to training-example equations; neither representation is universally faster.
The kernel trick saves explicit feature construction when the positive-semidefinite kernel is economical to evaluate; it does not remove the cost of optimization, choose a useful positive-semidefinite kernel, or establish generalization. Random Fourier features illustrate a different tradeoff: replacing the exact Gaussian kernel with a finite approximate feature map can reduce dependence on the sample count while introducing approximation error.
Covariance function Created 2026-09-28 Updated 2026-10-14
For a real-valued stochastic process with finite second moments, write . Its covariance function isThe diagonal gives the variance at each time; off-diagonal values record linear dependence between times. For the independent standard normal random variables above, , whereas the shared Gaussian process has for all . For a fair simple random walk on the integer line, ; Brownian motion has the continuous-time counterpart . These formulas quantify how much random history the observations share.
Every covariance function is a positive-semidefinite kernel. Indeed, for any real coefficients ,Thus a proposed covariance function must make every finite covariance matrix positive semidefinite. For a Gaussian process, the mean function and the covariance function determine every finite-dimensional distribution, including degenerate ones such as the shared process. Conversely, any real positive-semidefinite kernel satisfying , together with a specified mean function, defines consistent multivariate normal distributions; the Kolmogorov extension theorem then constructs a Gaussian process. For a general stochastic process, covariance alone does not determine the full law. The exceptional completeness of this description is what makes Gaussian process regression possible with a mean and a covariance model.
Dual prediction with a kernel 2026-10-14
If the weight vector lies in the linear span of the training feature map outputs, write . ThenThis is a dual representation: coefficients weight training examples rather than feature coordinates. They need not be positive, and need not be unique when the kernel matrix is singular. Some kernel methods instead write with under their own optimization constraints.[ref]
The kernel trick by Ryan Giordano. Kernelizing classification with support vector machines: displayed prediction as a sum of label-weighted kernel evaluations
The formula is an algebraic conversion for a weight vector in this linear span, not a claim about every possible weight vector. The representer theorem gives a broader reason this form appears in regularized kernel methods.For the XOR separation by a product feature, let have rows . The Gram matrix of those rows, equivalently the kernel matrix, isIts eigenvalues are , so it is a positive semidefinite matrix of rank two, not an invertible matrix. More generally, for any real coefficient vector and any finite set of inputs,This proves the positive-semidefinite kernel condition for the displayed polynomial kernel on all of , rather than checking only this square.
Here , so the explicit choice gives and . ConsequentlyFor the new input , the four polynomial kernel evaluations are . Their weighted sum is , and the sign function predicts . No explicit feature map is needed for this calculation. These coefficients were constructed to reproduce the chosen separator; no fitting algorithm or generalization guarantee is being asserted.
Gaussian density kernel 2026-10-14
The Gaussian density kernel is the standard normal probability density used as a unit-integral kernel for density estimation. Its second moment is one and . Its canonical kernel has scale . It is a function of one smoothing displacement, distinct from the two-argument Gaussian kernel used as a positive-semidefinite kernel.
Gaussian kernel 2026-09-24
The Gaussian kernel is a translation-invariant positive-semidefinite kernel whose canonical feature map takes values in an infinite-dimensional vector space.
Suppose is a positive-semidefinite kernel for every and its diagonal entries are integrable. Positivity of each kernel matrix givesThe Cauchy-Schwarz inequality makes every entry integrable, and integrating each nonnegative finite quadratic form shows that is again a positive-semidefinite kernel.
Kernel method 2026-09-24
A kernel method represents data through a positive-semidefinite kernel, allowing algorithms to use inner products in an implicit feature map.
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. Laplace kernel 2026-09-28
The Laplace kernel on is a translation-invariant positive-semidefinite kernel. Independent standard Cauchy random variables give its Random Fourier feature representation through their characteristic function .
Mercer kernel Created 2026-10-06 Updated 2026-10-14
In the compact-domain spectral setting, a Mercer kernel is a continuous symmetric positive-semidefinite kernel on a compact space equipped with a finite full-support measure. Mercer's theorem yields nonnegative eigenvalues and an expansion , giving features in . The finite-Gram positivity condition on arbitrary domains is more general than these spectral hypotheses; all such kernels still have a Reproducing kernel Hilbert space realization.
Past exam of the mathematics course of the University of Cambridge 2016 iii Paper 205 2 Solution Created 2026-10-03 Updated 2026-10-14
Use the normalizationThis is ridge regression; the penalty is the squared Euclidean norm. The centering removes the need for an intercept. Differentiating gives the normal equationFor every nonzero , . The coefficient matrix is therefore a positive-definite matrix, even if the design matrix has deficient matrix rank. The objective is a strictly convex function, so the unique minimizer is the closed-form ridge regression estimator, with fitted values
For the primal-dual identity for ridge regression, put and observeBoth parenthesized matrices are positive-definite matrices. Multiplying by their inverses givesThus the same fitted vector has the dual expressionNo inverse of or alone was needed. This is also the kernel-ridge hat matrix for the linear kernel.
Here a positive-definite kernel means a symmetric real-valued function whose every finite kernel matrix is positive semidefinite: for all , and ,This is the usual positive-semidefinite kernel convention; strict positivity for distinct points is not required. In particular . Write , and . Positivity of the two-point kernel matrix impliesIf , substitute to obtain . If , the affine expression can be nonnegative for every only if . Both cases give the Cauchy-Schwarz inequality for positive-semidefinite kernels:The zero-diagonal case is essential when the positive-definite kernel is not strictly positive.
To construct a feature map, let be the real vector space of finite formal linear combinations of symbols , one for each . Define a symmetric bilinear form byThe positive-definite kernel property makes this a positive semidefinite bilinear form. It need not yet be an inner product: distinct formal vectors can have zero squared length. The same quadratic-polynomial argument, now applied to , provesTherefore implies for every . The setis the radical of a bilinear form, hence a linear subspace. SetThe quotient vector space has a well-defined inner product: changing representatives by elements of changes no pairing, and a zero-length class is exactly the zero class. It is therefore an inner product space.
Define . By construction,Every positive-definite kernel thus has a feature representation, including degenerate kernels and the zero kernel. This is its canonical feature space of a positive-semidefinite kernel. The construction already gives the requested inner product space.
Past exam of the mathematics course of the University of Cambridge 2017 iii Paper 217 2 Solution Created 2026-10-03 Updated 2026-10-06
Construct a mean-square derivative of a Gaussian process on the original probability space before choosing its continuous modification. The real covariance function satisfies , because covariance is symmetric. Three-times differentiability implies that is continuous everywhere and differentiable at zero. Since is an even function,This uses differentiability of at zero, not a bound on throughout a neighborhood.
Let for . Twice applying the fundamental theorem of calculus to the covariance function givesOriented integrals make this identity valid for negative as well as positive . For a fixed , the right side tends to as . In particular,By completeness of L2 space, the mean-square derivative of a Gaussian processexists. Finite vectors consisting of values of and have a centered multivariate normal distribution: approximate the coordinates by difference quotients and use mean-square convergence and characteristic functions. Thus is a centered Gaussian process jointly constructed with , withIn particular , and is a positive-semidefinite kernel because it is an actual covariance function. Merely constructing an unrelated Gaussian process with that covariance function would not yet construct a modification of a stochastic process of .
The increment variance of isFor small , differentiability of at zero bounds this by . For the remaining distances in , continuity of enlarges to give the same bound. The fourth moment of a centered normal distribution is three times its variance squared, soThe one-dimensional Kolmogorov continuity theorem states that with gives a continuous modification, with sample-path Hölder continuity of every order less than . Apply it here with . We obtain a continuous modification on . On its null exceptional event, set the entire path equal to zero.
Define, on this same probability space,The path integral exists because its integrand is a continuous function. It agrees in L2 space with the integral of : Riemann sums converge in L2 space because is mean-square continuous; sums of have the same values almost surely at each finite collection of mesh points and converge pathwise to the integral. These two limits therefore agree almost surely for each fixed . Equivalently, the integral is the Bochner integral of the L2 space-valued map .
To verify the modification of a stochastic process property directly, put and . The preceding covariance identities and the fundamental theorem of calculus giveTherefore and almost surely for every fixed . This is also the mean-square fundamental theorem of calculus in this stationary setting. If a version on all of is desired, retain the original outside ; equality at every fixed parameter still holds.
The ordinary fundamental theorem of calculus now gives the simultaneous pathwise conclusionThus the requested differentiable modification of a stationary Gaussian process exists. Integrability of is compatible with the hypotheses but is unnecessary for this direct argument. It also avoids any assumption that a third absolute moment of a spectral density follows from three-times differentiability.
Past exam of the mathematics course of the University of Cambridge 2018 iii Paper 218 2 a Solution Created 2026-10-03 Updated 2026-10-05
In the terminology used for positive-definite kernels, positive definiteness means positive semidefiniteness of every finite kernel matrix: is symmetric and, for every , points and real ,The linear kernel is symmetric, andThus it is a positive-semidefinite kernel, with the identity as its feature map. It need not be strictly positive definite: a zero vector or linearly dependent points can make this quadratic form zero for nonzero . This distinction is essential when interpreting the terminology.
Past exam of the mathematics course of the University of Cambridge 2019 iii Paper 205 3 1 Solution Created 2026-10-03 Updated 2026-10-14
A positive-semidefinite kernel on is a symmetric function such that, for every and ,If for a feature map into an inner product space, thenThus every feature-map inner product is a kernel. If , then each finite quadratic form for is the corresponding nonnegative linear combination, so nonnegative linear combinations of kernels are kernels.
