Skip to content

euclidean_distance_interdependence

Bases: numerical_kernel_based_interdependence

A kernel-based interdependence class using the Euclidean distance kernel.

Notes

Euclidean Distance based Kernel:

\[
    \begin{equation}
    \text{kernel}(\mathbf{x}, \mathbf{y}) = 1- \left\| \mathbf{x} - \mathbf{y} \right\|_2.
    \end{equation}
\]

Attributes:

Name Type Description
kernel Callable

The Euclidean distance kernel function.

Methods:

Name Description
__init__

Initializes the Euclidean distance interdependence function.

Source code in tinybig/interdependence/numerical_kernel_interdependence.py
class euclidean_distance_interdependence(numerical_kernel_based_interdependence):
    r"""
        A kernel-based interdependence class using the Euclidean distance kernel.

        Notes
        ----------
        __Euclidean Distance based Kernel:__

        $$
            \begin{equation}
            \text{kernel}(\mathbf{x}, \mathbf{y}) = 1- \left\| \mathbf{x} - \mathbf{y} \right\|_2.
            \end{equation}
        $$

        Attributes
        ----------
        kernel : Callable
            The Euclidean distance kernel function.

        Methods
        -------
        __init__(...)
            Initializes the Euclidean distance interdependence function.
    """
    def __init__(self, name: str = 'euclidean_distance_interdependence', *args, **kwargs):
        """
            Initializes the Euclidean distance interdependence function.

            Parameters
            ----------
            name : str, optional
                Name of the interdependence function. Defaults to 'euclidean_distance_interdependence'.
            *args : tuple
                Additional positional arguments for the parent class.
            **kwargs : dict
                Additional keyword arguments for the parent class.
        """
        super().__init__(kernel=euclidean_distance_kernel, name=name, *args, **kwargs)

__init__(name='euclidean_distance_interdependence', *args, **kwargs)

Initializes the Euclidean distance interdependence function.

Parameters:

Name Type Description Default
name str

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

'euclidean_distance_interdependence'
*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 = 'euclidean_distance_interdependence', *args, **kwargs):
    """
        Initializes the Euclidean distance interdependence function.

        Parameters
        ----------
        name : str, optional
            Name of the interdependence function. Defaults to 'euclidean_distance_interdependence'.
        *args : tuple
            Additional positional arguments for the parent class.
        **kwargs : dict
            Additional keyword arguments for the parent class.
    """
    super().__init__(kernel=euclidean_distance_kernel, name=name, *args, **kwargs)