Code
import numpy as np
from scipy.stats import multivariate_normal
%matplotlib inline
%config InlineBackend.figure_format = 'svg'
import matplotlib
#matplotlib.rcParams['figure.figsize'] = (8,6)
from matplotlib import pyplot as plt
import GPyNipun Batra
October 25, 2022
In this notebook, we cover multi-output GPs. The presentation follows the excellent video from GPSS
\(u \sim GP (0, k)\)
sample from u to get a sample \(u^1\)
\(f_1(x) = a^1_1 u^1(x)\)
\(f_2(x) = a^1_2 u^1(x)\)
array([1.28521323, 1.2870487 , 1.28169798, 1.29387391, 1.28381124,
1.29063798, 1.28399272, 1.28787108, 1.27634933, 1.29367057,
1.19405718, 0.81421541, 1.29366628, 1.23932848, 1.28601429,
1.31178054, 1.27596873, 1.28139033, 1.28548127, 1.28874727,
1.288544 , 1.28851575, 1.27706874, 1.28929381, 1.27167387,
1.30216154, 1.28769528, 1.28397652, 1.2896767 , 1.29357874,
1.28743778, 1.28867757, 1.29135504, 1.28085954, 1.27832016,
1.29113682, 1.28346876, 1.28115477, 1.28579679, 1.28664088,
1.2836771 , 1.28690568, 1.28521466, 1.28474094, 1.28147929,
1.28752966, 1.28577663, 1.28154063, 1.28312776, 1.2869964 ])
array([[1. , 0.99812754, 0.99253116, ..., 0.01592046, 0.01332383,
0.011109 ],
[0.99812754, 1. , 0.99812754, ..., 0.01895197, 0.01592046,
0.01332383],
[0.99253116, 0.99812754, 1. , ..., 0.02247631, 0.01895197,
0.01592046],
...,
[0.01592046, 0.01895197, 0.02247631, ..., 1. , 0.99812754,
0.99253116],
[0.01332383, 0.01592046, 0.01895197, ..., 0.99812754, 1. ,
0.99812754],
[0.011109 , 0.01332383, 0.01592046, ..., 0.99253116, 0.99812754,
1. ]])
(DeviceArray([[ 0.03298171, -0.01370936],
[-0.01370936, 0.00569851]], dtype=float64),
DeviceArray([[ 0.18160867],
[-0.07548848]], dtype=float64))
DeviceArray([[ 1.24957827, -0.04698574],
[-0.04698574, 0.57577417]], dtype=float64)
0 -387.06097276826193 0.500429427376359 1.0913929924306696
100 -306.72979544101435 3.6414838350262055 2.363476650308803
200 -305.64842462218047 3.514293617054404 2.3873529546968477
300 -304.7976816183849 3.379382170959892 2.403204858135416
400 -304.0941499412901 3.236859846397818 2.4140771572105426