Graph kernel functions API documentation¶
TightHannKernel ¶
TightHannKernel(n_scales, max_eig, omega=None)
TightHannKernel class.
Thie class constructs a spectrum-adaptive tight-hann kernel function used in its corresponding wavelet transform. Based off of the implementation from Tabar et. al 2021 of the algorithm originally described in Shuman et. al 2015
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
n_scales
|
int
|
number of scales used in wavelet transform |
required |
max_eig
|
Tensor
|
the maximum eigenvalue of the graph laplacian. Used for scaling purposes |
required |
omega
|
Callable[[Tensor], Tensor] | None
|
warping function. Defaults to None |
None
|
Source code in gsxform/kernel.py
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 | |
get_adapted_kernel ¶
get_adapted_kernel(eig, scale)
Compute spectrum adapted kernels.
return self.kernel(self.omega(eig) - self.d / self.R * (scale - self.R + 1))
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
eig
|
Tensor
|
input tensor of eigenvalues of the graph laplacian |
required |
scale
|
int
|
The scale parameter of the specific kernel. Not to be confused
with |
required |
Returns:
| Name | Type | Description |
|---|---|---|
adapted_kernel |
Tensor
|
scale-specific adapted kernel |
Source code in gsxform/kernel.py
78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 | |