Skip to content

gaussian_rbf_kernel_interdependence

Bases: numerical_kernel_based_interdependence

A kernel-based interdependence class using the Gaussian RBF (Radial Basis Function) kernel.

Notes

Gaussian RBF Kernel:

\[
    \begin{equation}
    \text{kernel}(\mathbf{x}, \mathbf{y} | \sigma) = \exp \left(- \frac{\left\| \mathbf{x} - \mathbf{y} \right\|^2_2}{2 \sigma^2} \right).
    \end{equation}
\]

Attributes:

Name Type Description
kernel Callable

The Gaussian RBF kernel function.

Methods:

Name Description
__init__

Initializes the Gaussian RBF kernel interdependence function.

Source code in tinybig/interdependence/numerical_kernel_interdependence.py
class gaussian_rbf_kernel_interdependence(numerical_kernel_based_interdependence):
    r"""
        A kernel-based interdependence class using the Gaussian RBF (Radial Basis Function) kernel.

        Notes
        ----------
        __Gaussian RBF Kernel:__

        $$
            \begin{equation}
            \text{kernel}(\mathbf{x}, \mathbf{y} | \sigma) = \exp \left(- \frac{\left\| \mathbf{x} - \mathbf{y} \right\|^2_2}{2 \sigma^2} \right).
            \end{equation}
        $$

        Attributes
        ----------
        kernel : Callable
            The Gaussian RBF kernel function.

        Methods
        -------
        __init__(...)
            Initializes the Gaussian RBF kernel interdependence function.
    """
    def __init__(self, name: str = 'gaussian_rbf_kernel_interdependence', sigma: float = 1.0, *args, **kwargs):
        """
            Initializes the Gaussian RBF kernel interdependence function.

            Parameters
            ----------
            name : str, optional
                Name of the interdependence function. Defaults to 'gaussian_rbf_kernel_interdependence'.
            sigma : float, optional
                Standard deviation of the Gaussian RBF kernel. Defaults to 1.0.
            *args : tuple
                Additional positional arguments for the parent class.
            **kwargs : dict
                Additional keyword arguments for the parent class.
        """
        gaussian_rbf_kernel_func = functools.partial(gaussian_rbf_kernel, sigma=sigma)
        super().__init__(kernel=gaussian_rbf_kernel_func, name=name, *args, **kwargs)

__init__(name='gaussian_rbf_kernel_interdependence', sigma=1.0, *args, **kwargs)

Initializes the Gaussian RBF kernel interdependence function.

Parameters:

Name Type Description Default
name str

Name of the interdependence function. Defaults to 'gaussian_rbf_kernel_interdependence'.

'gaussian_rbf_kernel_interdependence'
sigma float

Standard deviation of the Gaussian RBF kernel. Defaults to 1.0.

1.0
*args tuple

Additional positional arguments for the parent class.

()
**kwargs dict

Additional keyword arguments for the parent class.

{}
Source code in tinybig/interdependence/numerical_kernel_interdependence.py
def __init__(self, name: str = 'gaussian_rbf_kernel_interdependence', sigma: float = 1.0, *args, **kwargs):
    """
        Initializes the Gaussian RBF kernel interdependence function.

        Parameters
        ----------
        name : str, optional
            Name of the interdependence function. Defaults to 'gaussian_rbf_kernel_interdependence'.
        sigma : float, optional
            Standard deviation of the Gaussian RBF kernel. Defaults to 1.0.
        *args : tuple
            Additional positional arguments for the parent class.
        **kwargs : dict
            Additional keyword arguments for the parent class.
    """
    gaussian_rbf_kernel_func = functools.partial(gaussian_rbf_kernel, sigma=sigma)
    super().__init__(kernel=gaussian_rbf_kernel_func, name=name, *args, **kwargs)