matrix_variate_multitask_kernel
MatrixVariateIndexKernel
Bases: Kernel
Wraps IndexKernel to represent https://en.wikipedia.org/wiki/Matrix_normal_distribution
P(X | M, U, V) = exp(-0.5 tr[ V⁻¹ (X - M)ᵀ U⁻¹ (X-M) ] ) / √((2π)ⁿᵖ|V|ⁿ|U|ᵖ)
vec(X) ~ 𝒩(M, V ⊗ U)
This kernel represents the covariance_matrix V ⊗ U given V and U.
Source code in bayes_cbf/matrix_variate_multitask_kernel.py
18 19 20 21 22 23 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 |
|
MatrixVariateKernel
Bases: Kernel
Kernel supporting Kronecker style matrix variate Gaussian processes (where every data point is evaluated at every task).
Given a base covariance module to be used for the data, :math:K_{XX}
,
this kernel computes a task kernel of specified size :math:K_{TT}
and
returns :math:K = K_{TT} \otimes K_{XX}
. as an
:obj:gpytorch.lazy.KroneckerProductLazyTensor
.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
task_covar_module |
obj: |
required | |
data_covar_module |
obj: |
required | |
num_tasks |
int
|
Number of tasks |
required |
batch_size |
int
|
Set if the MultitaskKernel is operating on batches of data (and you want different parameters for each batch) |
required |
rank |
int
|
Rank of index kernel to use for task covariance matrix. |
required |
task_covar_prior |
obj: |
required |
Source code in bayes_cbf/matrix_variate_multitask_kernel.py
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 |
|