kl_divergence_interdependence
Bases: statistical_kernel_based_interdependence
A statistical kernel-based interdependence class using the KL divergence kernel.
Notes
KL Divergence based Kernel:
$$ \begin{equation} \text{kernel}(\mathbf{x}, \mathbf{y}) = \sum_i \mathbf{x}(i) \log \left(\frac{\mathbf{x}(i)}{\mathbf{y}(i)} \right), \end{equation} $$ where \(\mb{x}\) and \(\mb{y}\) have been normalized.
Attributes:
Name | Type | Description |
---|---|---|
kernel |
Callable
|
The KL divergence kernel function. |
Methods:
Name | Description |
---|---|
__init__ |
Initializes the KL divergence interdependence function. |
Source code in tinybig/interdependence/statistical_kernel_interdependence.py
__init__(name='kl_divergence_interdependence', *args, **kwargs)
Initializes the KL divergence interdependence function.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name
|
str
|
Name of the interdependence function. Defaults to 'kl_divergence_interdependence'. |
'kl_divergence_interdependence'
|
*args
|
tuple
|
Additional positional arguments for the parent class. |
()
|
**kwargs
|
dict
|
Additional keyword arguments for the parent class. |
{}
|