alibi_detect.utils.tensorflow.kernels module

class alibi_detect.utils.tensorflow.kernels.GaussianRBF(sigma=None)[source]

Bases: object

__init__(sigma=None)[source]

Gaussian RBF kernel: k(x,y) = exp(-(1/(2*sigma^2)||x-y||^2). A forward pass takes a batch of instances x [Nx, features] and y [Ny, features] and returns the kernel matrix [Nx, Ny].

Parameters

sigma (Optional[Tensor]) – Optional sigma used for the kernel.

Return type

None