Path: blob/master/notebooks/book2/18/gp_deep_kernel_learning.ipynb
1193 views
Kernel: Python 3 (ipykernel)
Combine an MLP with a GP
Modified from https://tinygp.readthedocs.io/en/latest/tutorials/transforms.html
In [1]:
Data
In [2]:
Out[2]:
/home/patel_zeel/miniconda3/envs/pyprobml/lib/python3.7/site-packages/probml_utils/plotting.py:26: UserWarning: LATEXIFY environment variable not set, not latexifying
warnings.warn("LATEXIFY environment variable not set, not latexifying")
In [3]:
Out[3]:
/home/patel_zeel/miniconda3/envs/pyprobml/lib/python3.7/site-packages/probml_utils/plotting.py:79: UserWarning: set FIG_DIR environment variable to save figures
warnings.warn("set FIG_DIR environment variable to save figures")
Deep kernel
We transform the (1d) input using an MLP and then pass it to a Matern kernel.
In [4]:
In [5]:
Out[5]:
WARNING:absl:No GPU/TPU found, falling back to CPU. (Set TF_CPP_MIN_LOG_LEVEL=0 and rerun for more info.)
In [6]:
Out[6]:
/home/patel_zeel/miniconda3/envs/pyprobml/lib/python3.7/site-packages/probml_utils/plotting.py:79: UserWarning: set FIG_DIR environment variable to save figures
warnings.warn("set FIG_DIR environment variable to save figures")
Shallow kernel
In [7]:
In [8]:
In [9]:
Out[9]:
/home/patel_zeel/miniconda3/envs/pyprobml/lib/python3.7/site-packages/probml_utils/plotting.py:79: UserWarning: set FIG_DIR environment variable to save figures
warnings.warn("set FIG_DIR environment variable to save figures")