Euclidean Kernels

Euclidean Kernel Class

The EuclideanKernel class is the parent class for all Euclidean kernels. It is imported using the following command:

>>> from UQpy.utilities.kernels.baseclass.EuclideanKernel import EuclideanKernel
class EuclideanKernel(kernel_parameter)[source]

This is a blueprint for Euclidean kernels implemented in the kernels module .

abstract calculate_kernel_matrix(x, s)

Abstract method that needs to be implemented by the user when creating a new Covariance function.

Gaussian Kernel

The Gaussian kernel is defined by:

\[k(\mathbf{x}_i,\mathbf{x}_j) = \exp\left(\dfrac{||\mathbf{x}_i-\mathbf{x}_j||^2}{2\epsilon^2}\right)\]

The GaussianKernel class is imported using the following command:

>>> from UQpy.utilities.kernels.GaussianKernel import GaussianKernel

One can use the following to instantiate the GaussianKernel class.

Methods

class GaussianKernel(kernel_parameter=1.0)[source]
Parameters:

epsilon – Scale parameter of the Gaussian kernel

optimize_parameters(data, tolerance, n_nearest_neighbors, n_cutoff_samples, random_state=None)[source]
Parameters:
  • data (ndarray) – Set of data points.

  • tolerance (float) – Tolerance below which the Gaussian kernel is assumed to be zero.

  • n_nearest_neighbors (int) – Number of neighbors to use for cut-off estimation.

  • n_cutoff_samples (int) – Number of samples to use for cut-off estimation.

  • random_state (Union[None, int, RandomState]) – Random seed used to initialize the pseudo-random number generator. If an int is provided, this sets the seed for an object of numpy.random.RandomState. Otherwise, the object itself can be passed directly.

Attributes

GaussianKernel.kernel_matrix