In the field of multivariate statistics, kernel principal component analysis (kernel PCA)[1] is an extension of principal component analysis (PCA) using techniques of kernel methods. Using a kernel, the originally linear operations of PCA are performed in a reproducing kernel Hilbert space.
Recall that conventional PCA operates on zero-centered data; that is,
1 | |
N |
N | |
\sum | |
i=1 |
xi=0
xi
N
C= | 1 |
N |
N | |
\sum | |
i=1 |
xix
\top | |
i |
λv=Cv
λ
\top | |
x | |
i |
\top | |
v=x | |
i |
Cv rm{for}~i=1,\ldots,N
To understand the utility of kernel PCA, particularly for clustering, observe that, while N points cannot, in general, be linearly separated in
d<N
d\geqN
xi
\Phi(xi)
\Phi:Rd\toRN
\Phi
Instead, in kernel PCA, a non-trivial, arbitrary
\Phi
\Phi
\Phi
K=k(x,y)=(\Phi(x),\Phi(y))=\Phi(x)T\Phi(y)
which represents the inner product space (see Gramian matrix) of the otherwise intractable feature space. The dual form that arises in the creation of a kernel allows us to mathematically formulate a version of PCA in which we never actually solve the eigenvectors and eigenvalues of the covariance matrix in the
\Phi(x)
Because we are never working directly in the feature space, the kernel-formulation of PCA is restricted in that it computes not the principal components themselves, but the projections of our data onto those components. To evaluate the projection from a point in the feature space
\Phi(x)
Vk
{Vk}T\Phi(x)
N | |
=\left(\sum | |
i=1 |
k | |
a | |
i\Phi(x |
T\Phi(x) | |
i)\right) |
We note that
T\Phi(x) | |
\Phi(x | |
i) |
K
k | |
a | |
i |
Nλa=Ka
where
N
λ
a
K
ak
1=(Vk)TVk
Care must be taken regarding the fact that, whether or not
x
K
K'
K'=K-
1N |
K-K
1N |
+
1N |
K
1N |
where
1N |
1/N
K'
One caveat of kernel PCA should be illustrated here. In linear PCA, we can use the eigenvalues to rank the eigenvectors based on how much of the variation of the data is captured by each principal component. This is useful for data dimensionality reduction and it could also be applied to KPCA. However, in practice there are cases that all variations of the data are same. This is typically caused by a wrong choice of kernel scale.
In practice, a large data set leads to a large K, and storing K may become a problem. One way to deal with this is to perform clustering on the dataset, and populate the kernel with the means of those clusters. Since even this method may yield a relatively large K, it is common to compute only the top P eigenvalues and eigenvectors of the eigenvalues are calculated in this way.
Consider three concentric clouds of points (shown); we wish to use kernel PCA to identify these groups. The color of the points does not represent information involved in the algorithm, but only shows how the transformation relocates the data points.
First, consider the kernel
k(\boldsymbol{x},\boldsymbol{y})=(\boldsymbol{x}T\boldsymbol{y}+1)2
Applying this to kernel PCA yields the next image.
Now consider a Gaussian kernel:
k(\boldsymbol{x},\boldsymbol{y})=
| ||||
e |
\boldsymbol{y}||2}{2\sigma2},
That is, this kernel is a measure of closeness, equal to 1 when the points coincide and equal to 0 at infinity.
Note in particular that the first principal component is enough to distinguish the three different groups, which is impossible using only linear PCA, because linear PCA operates only in the given (in this case two-dimensional) space, in which these concentric point clouds are not linearly separable.
Kernel PCA has been demonstrated to be useful for novelty detection[3] and image de-noising.[4]