The Kernel Trick

A pattern may be difficult to separate with a straight boundary until we change how it is represented. A kernel lets us compare examples in a transformed space without explicitly building every new feature.

16 sections · 14 questions · 4 coding challenges

1 / 16

Could a Different View Make the Groups Easier to Separate?

BOTIE

Imagine one group of points surrounded by another. Moving a straight dividing line around the picture will not separate them. We need to change the information used to describe each point, such as adding its distance from the middle.

In 1992, Boser, Guyon and Vapnik showed how an optimal-margin classifier could work with a kernel to use richer features. This was an important machine-learning application of a mathematical idea with earlier roots: some calculations in a transformed space can be obtained directly from the original observations.

A transformation can stretch or rotate coordinates, but those linear changes alone will not separate a surrounding ring from its centre. Adding a nonlinear feature can: the central points and the ring may occupy different heights in a new view, where a plane separates them. A suitable kernel computes the inner products that the method needs in that feature space, without explicitly constructing every new coordinate. The next walkthrough makes that change of view visible.

Sources for this history