Kernels¶
Kernel functions for use in evolutionary algorithms.
Kernels have the signature (x, y, params) -> similarity and are used by the Stein
Variational Evolution Strategies to couple their search distributions.
RBFKernelParams ¶
Bases: Protocol
Parameters required by the RBF kernel.
kernel_rbf ¶
Radial basis function kernel.
Computes exp(-0.5 * sum(((x - y) / params.kernel_std) ** 2)).
Parameters:
-
x(Array) –First point.
-
y(Array) –Second point.
-
params(RBFKernelParams) –Hyperparameters with a
kernel_stdfield, the kernel bandwidth.
Returns:
-
Array–The kernel value, a scalar for vector inputs.