Attentive Kernel
sgptools.kernels.attentive_kernel
Attentive Kernel function
AttentiveKernel
Bases: Kernel
Attentive Kernel function (non-stationary kernel function). Based on the implementation from this repo
Refer to the following papers for more details
- AK: Attentive Kernel for Information Gathering [Chen et al., 2022]
Parameters:
Name | Type | Description | Default |
---|---|---|---|
lengthscales |
List
|
List of lengthscales to use in the mixture components. The lengthscales are not trained. |
required |
amplitude |
int
|
Initial amplitude of the kernel function |
1.0
|
dim_hidden |
int
|
Number of MLP hidden layer nodes (The NN will have two of these layers) |
10
|
num_dim |
int
|
Number of dimensions of the data points |
2
|
Source code in sgptools/kernels/attentive_kernel.py
K(X, X2=None)
Computes the covariances between/amongst the input variables
Parameters:
Name | Type | Description | Default |
---|---|---|---|
X |
ndarray
|
Variables to compute the covariance matrix |
required |
X2 |
ndarray
|
If passed, the covariance between X and X2 is computed. Otherwise, the covariance between X and X is computed. |
None
|
Returns:
Name | Type | Description |
---|---|---|
cov |
ndarray
|
covariance matrix |
Source code in sgptools/kernels/attentive_kernel.py
cdist(x, y)
Calculate the pairwise euclidean distances