manhattan_distance_interdependence
Bases: numerical_kernel_based_interdependence
A kernel-based interdependence class using the Manhattan distance kernel.
Notes
Manhattan Distance based Kernel:
\[
\begin{equation}
\text{kernel}(\mathbf{x}, \mathbf{y}) = 1- \left\| \mathbf{x} - \mathbf{y} \right\|_1.
\end{equation}
\]
Attributes:
| Name | Type | Description |
|---|---|---|
kernel |
Callable
|
The Manhattan distance kernel function. |
Methods:
| Name | Description |
|---|---|
__init__ |
Initializes the Manhattan distance interdependence function. |
Source code in tinybig/interdependence/numerical_kernel_interdependence.py
__init__(name='manhattan_distance_interdependence', *args, **kwargs)
Initializes the Manhattan distance interdependence function.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Name of the interdependence function. Defaults to 'manhattan_distance_interdependence'. |
'manhattan_distance_interdependence'
|
*args
|
tuple
|
Additional positional arguments for the parent class. |
()
|
**kwargs
|
dict
|
Additional keyword arguments for the parent class. |
{}
|