Common Kernel Functions: RBF, Matérn, and Periodic
What you'll learn: How the most popular kernel functions shape Gaussian Process behavior and when to use each one.
Understanding Standard Kernels
In Gaussian Processes, the kernel function (also called covariance function) determines how similar two data points are. Different kernels encode different assumptions about how the output varies with input. Three families dominate practical applications.
Radial Basis Function (RBF) / Squared Exponential
The RBF kernel (also called squared exponential) assumes smooth, infinitely differentiable functions. It measures similarity based on Euclidean distance: points close together have high correlation, decaying smoothly as distance increases.
Use when: You expect smooth trends without abrupt changes—temperature forecasts, elevation mapping, or sensor interpolation.
Analogy: Like ripples spreading smoothly from a stone dropped in water.
Matérn Family
The Matérn kernels offer a spectrum of smoothness controlled by a parameter ν. When ν=1/2, functions can be rough and jagged; as ν increases, they become smoother, approaching RBF behavior at ν=∞.
Use when: You need flexibility in smoothness assumptions—financial data (often rough), or when RBF overfits by being "too smooth."
Analogy: Think of sketching with different pencil hardness—soft (smooth) vs. hard (rough edges).
Periodic Kernels
Periodic kernels capture repeating patterns with a specified period. They model cyclical behavior by wrapping the input space around itself.
Use when: Your data has clear seasonality—daily temperature cycles, weekly sales patterns, astronomical orbits.
Analogy: Like a circular track where lap 1 and lap 2 are similar because they follow the same pattern.
Choosing Your Kernel
Start with RBF for general smooth problems. Switch to Matérn when smoothness is uncertain or data appears rough. Add periodic components for known cyclical patterns. You can combine kernels (future topic!) to capture multiple behaviors.
Key Takeaway: RBF assumes smoothness, Matérn offers adjustable roughness, and Periodic captures cyclical patterns—choose based on your data's expected behavior.