Skip to content

one_interdependence

Bases: constant_c_interdependence

A class for one interdependence.

This class defines an interdependence matrix filled with zeros, which inherits from constant_c_interdependence class with constant factor \(c\) set to one.

Notes

Formally, based on the (optional) input data batch \(\mathbf{X} \in {R}^{b \times m}\), we define the one interdependence function as: $$ \begin{equation} \xi(\mathbf{X}) = 1.0 \times \mathbf{1} \in {R}^{m \times m}, \text{ or } \xi(\mathbf{X}) = 1.0 \times \mathbf{1} \in {R}^{b \times b}. \end{equation} $$

Methods:

Name Description
__init__

Initializes the one interdependence function.

Source code in tinybig/interdependence/basic_interdependence.py
class one_interdependence(constant_c_interdependence):
    r"""
        A class for one interdependence.

        This class defines an interdependence matrix filled with zeros, which inherits from `constant_c_interdependence` class
        with constant factor $c$ set to one.

        Notes
        -------
        Formally, based on the (optional) input data batch $\mathbf{X} \in {R}^{b \times m}$, we define the one interdependence function as:
        $$
            \begin{equation}
            \xi(\mathbf{X}) = 1.0 \times \mathbf{1} \in {R}^{m \times m}, \text{ or } \xi(\mathbf{X}) = 1.0 \times \mathbf{1} \in {R}^{b \times b}.
            \end{equation}
        $$

        Methods
        -------
        __init__(name='one_interdependence', ...)
            Initializes the one interdependence function.
    """

    def __init__(self, name: str = 'one_interdependence', *args, **kwargs):
        """
            Initializes the one interdependence function.

            This class sets the interdependence matrix to be filled with ones, representing a uniform
            relationship between all rows or columns of the input tensor.

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

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

Initializes the one interdependence function.

This class sets the interdependence matrix to be filled with ones, representing a uniform relationship between all rows or columns of the input tensor.

Parameters:

Name Type Description Default
name str

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

'one_interdependence'
*args tuple

Additional positional arguments for the parent constant_c_interdependence class.

()
**kwargs dict

Additional keyword arguments for the parent constant_c_interdependence class.

{}
Source code in tinybig/interdependence/basic_interdependence.py
def __init__(self, name: str = 'one_interdependence', *args, **kwargs):
    """
        Initializes the one interdependence function.

        This class sets the interdependence matrix to be filled with ones, representing a uniform
        relationship between all rows or columns of the input tensor.

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