kernels package
Contents
kernels package#
The primary model building interface in tinygp
is via “kernels”, which are
typically constructed as sums and products of objects defined in this
subpackage, or by subclassing Kernel
as discussed in the Custom Kernels
tutorial. Many of the most commonly used kernels are described in the
Stationary Kernels section, but this section introduces some of the
fundamental building blocks.
|
The base class for all kernel implementations |
|
A kernel used when conditioning a process on data |
|
A custom kernel class implemented as a callable |
|
A helper to represent the sum of two kernels |
|
A helper to represent the product of two kernels |
|
This kernel returns the constant |
The dot product kernel |
|
|
A polynomial kernel |
Stationary Kernels#
Many of the most commonly used kernels are implemented as subclasses of the
Stationary
kernel. This means that each kernel in this section has (at
least) the two parameters:
scale
: A scalar lengthscale for the kernel in the radial distance specified bydistance
, anddistance
: Atinygp.kernels.distance.Distance
metric specifying how to compute the scalar distance between two input coordinates.
Most of these kernels use the tinygp.kernels.distance.L1Distance
metric
by default, and scale
defaults to 1
.
|
A stationary kernel is defined with respect to a distance metric |
|
The exponential kernel |
|
The exponential squared or radial basis function kernel |
|
The Matern-3/2 kernel |
|
The Matern-5/2 kernel |
|
The cosine kernel |
|
The exponential sine squared or quasiperiodic kernel |
|
The rational quadratic |
Distance Metrics#
This submodule defines a set of distance metrics that can be used when working
with multivariate data. By default, all
tinygp.kernels.stationary.Stationary
kernels will use either an
L1Distance
or L2Distance
, when applied in multiple dimensions,
but it is possible to define custom metrics, as discussed in the Custom Geometry
tutorial.
|
An abstract base class defining a distance metric interface |
The L1 or Manhattan distance between two coordinates |
|
The L2 or Euclidean distance between two coordinates |