Path: blob/master/deprecated/notebooks/gp_spectral_mixture.ipynb
2279 views
Kernel: Python 3 (ipykernel)
Spectral mixture kernel in 1d for GP
https://tinygp.readthedocs.io/en/latest/tutorials/kernels.html#example-spectral-mixture-kernel
In this section, we will implement the "spectral mixture kernel" proposed by Gordon Wilson & Adams (2013).
In [1]:
Out[1]:
|████████████████████████████████| 126 kB 25.3 MB/s eta 0:00:01
|████████████████████████████████| 65 kB 4.4 MB/s eta 0:00:01
In [2]:
Out[2]:
WARNING:absl:No GPU/TPU found, falling back to CPU. (Set TF_CPP_MIN_LOG_LEVEL=0 and rerun for more info.)
Now let's implement the simulate some data from this model:
In [3]:
Out[3]:
One thing to note here is that we've used named parameters in a dictionary, instead of an array of parameters as in some of the other examples. This would be awkward (but not impossible) to fit using scipy, so instead we'll use optax for optimization:
In [4]:
Out[4]:
Using our optimized model, over-plot the conditional predictions:
In [5]:
Out[5]: