norse.torch.functional.gaussian_rbf

Contents

norse.torch.functional.gaussian_rbf#

norse.torch.functional.gaussian_rbf(tensor: Tensor, sigma: float = 1)[source]#

A gaussian radial basis kernel that calculates the radial basis given a distance value (distance between \(x\) and a data value \(x'\), or \(\|\mathbf{x} - \mathbf{x'}\|^2\) below).

\[K(\mathbf{x}, \mathbf{x'}) = \exp\left(- \frac{\|\mathbf{x} - \mathbf{x'}\|^2}{2\sigma^2}\right)\]
Parameters:

tensor (torch.Tensor): The tensor containing distance values to convert to radial bases sigma (float): The spread of the gaussian distribution. Defaults to 1.