Interactive demo · Bayesian and Probabilistic Machine Learning · Chapter 12

Kernel PCA

Kernel PCA does ordinary PCA in a feature space φ(x) that is never formed: everything is computed from the kernel k(x, x′) = exp(−‖x − x′‖2/c) through the centred Gram matrix K̃ (Bishop 2006, Section 12.3). Each panel colours the plane by the projection of φ(x) onto one principal direction in feature space, with contour lines where that projection is constant (dark: low, bright: high). Change the data, the kernel width c and the centring, and compare with linear PCA, whose components are only straight lines.

Data

Kernel width c (log scale)

Show

Component

Centre the Gram matrix (12.85)

Method

Scoreboard

Try these

The eigenvalues printed are those of the centred Gram matrix K̃, which are Nλi by (12.80), as in the book's Figure 12.17. Projections of new points use the kernel centred with the training means; without that, (12.87) differs only by a constant, so the contour lines are the same.

In the lecture notes