Kernel base class

class gp.kernels.base.Kernel[source]

Bases: object

K(x1, x2, out=None)[source]

Kernel function evaluated at x1 and x2.

Parameters :

x1 : numpy.ndarray with dtype='f8'

\(n\)-length vector

x2 : numpy.ndarray with dtype='f8'

\(m\)-length vector

Returns :

K : numpy.ndarray

\(n\times m\) array

copy()[source]

Create a copy of the kernel.

Returns :

kernel : Kernel

New kernel function object of type type(self).

hessian(x1, x2, out=None)[source]

Hessian of the kernel function evaluated at x1 and x2.

Parameters :

x1 : numpy.ndarray with dtype='f8'

\(n\)-length vector

x2 : numpy.ndarray with dtype='f8'

\(m\)-length vector

Returns :

H : numpy.ndarray

\(n_p\times n_p\times n\times m\) array, where \(n_p\) is the number of kernel parameters. See params.

jacobian(x1, x2, out=None)[source]

Jacobian of the kernel function evaluated at x1 and x2.

Parameters :

x1 : numpy.ndarray with dtype='f8'

\(n\)-length vector

x2 : numpy.ndarray with dtype='f8'

\(m\)-length vector

Returns :

J : numpy.ndarray

\(n_p\times n\times m\) array, where \(n_p\) is the number of kernel parameters. See params.

params[source]

Kernel parameters.

Returns :params : tuple
sym_K()[source]

Symbolic kernel function.

Returns :

K : sympy.Expr

A sympy expression representing the symbolic form of the kernel function.

Previous topic

Periodic kernel

This Page