custom_hybrid_kernel_interdependence
Bases: numerical_kernel_based_interdependence
A kernel-based interdependence class using a custom hybrid kernel.
This class combines multiple kernel functions into a single hybrid kernel.
Notes
Custom Hybrid Kernel:
$$ \begin{equation} \text{kernel}(\mathbf{x}, \mathbf{y} | \alpha, \beta) = \alpha k_1(\mathbf{x}, \mathbf{y}) + \beta k_2(\mathbf{x}, \mathbf{y}), \end{equation} $$ where \(k_1\) and \(k_2\) are custom designed kernel, and \(\alpha, \beta\) are the weights.
Attributes:
Name | Type | Description |
---|---|---|
kernel |
Callable
|
The hybrid kernel function combining multiple kernels. |
weights |
(List[float], optional)
|
Weights applied to each kernel function. |
Methods:
Name | Description |
---|---|
__init__ |
Initializes the custom hybrid kernel interdependence function. |
Source code in tinybig/interdependence/numerical_kernel_interdependence.py
__init__(kernels, weights=None, name='custom_hybrid_kernel_interdependence', *args, **kwargs)
Initializes the custom hybrid kernel interdependence function.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
kernels
|
List[Callable[[matrix], matrix]]
|
List of kernel functions to combine. |
required |
weights
|
List[float]
|
Weights applied to each kernel function. Defaults to None, indicating equal weights. |
None
|
name
|
str
|
Name of the interdependence function. Defaults to 'custom_hybrid_kernel_interdependence'. |
'custom_hybrid_kernel_interdependence'
|
*args
|
tuple
|
Additional positional arguments for the parent class. |
()
|
**kwargs
|
dict
|
Additional keyword arguments for the parent class. |
{}
|