liveBook · Manning

Radial basis function

As explained in Grokking Machine Learning

A function whose value depends only on the distance from its input to a specified center.

A radial basis function produces a value from distance to a chosen center: nearby points receive high similarity, while distant points receive low similarity. Its graph resembles a Gaussian-shaped hill. In classification, several such functions transform a dataset so a linear separator in the expanded space becomes a curved boundary in the original space. section 11.3

An RBF-based classifier works by:

  • Creating similarity columns relative to selected data points, using a distance-based expression such as e^(−distance²). section 11.3
  • Combining those columns so originally inseparable classes become separable by a plane in the expanded space. section 11.3
  • Projecting the separating plane back to obtain a curved classification boundary. section 11.3
  • Adjusting gamma: small values create wide functions, whereas large values create narrow functions. section 11.3

Separating a one-dimensional pattern

For points −1, 0, and 1 labeled 1, 0, and 1, respectively, a linear classifier cannot isolate the middle point. RBF hills at label-1 points and a valley at the label-0 point combine into a function crossing the axis twice, defining the classifier’s boundaries. section 11.3

Figure 11.20 Using an SVM with the RBF kernel to separate a nonlinear dataset in one dimension. Top: We draw a mountain (radial basis function) at each point with label 1 and a valley at each point of label 0. Bottom: We add the radial basis functions from the top figure. The resulting function intersects the axis twice. The two points of intersection are the boundary of our SVM classifier. We classify each point between them as a square (label 0) and every point outside as a triangle (label 1).

Use the figure to see how individual RBF mountains and valleys combine into two decision boundaries. section 11.3

How Grokking Machine Learning covers it

How deep it goes
Explains similarity columns, geometric lifting, gamma’s width effect, and SVC examples, but does not derive kernel optimization.
Examples
Demonstrates one-dimensional points, two-dimensional datasets, similarity tables, curved boundaries, and SVC models with varied gamma values.
What it assumes
Assumes basic datasets and linear classifiers, then develops nonlinear separation through geometric and distance-based examples.
What you can do after
Apply it via SVC with an RBF kernel and compare classifiers produced by different gamma values.
How it connects
Connects kernel method, support vector machines, similarity, feature maps, and nonlinear classification.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Grokking Machine Learning. The section links point to the parts of the book it draws on.