Getting Started with Multivariate Gaussian Processes (vector autoregression) (original) (raw)
February 13, 2025, 5:28pm 1
Hello there,
I’m currently trying to apply Gaussian processes to vector autoregression. Specifically in the case where n>3 an example might be here:(https://arxiv.org/pdf/2112.01995)
While I find a lot of the pymc examples really helpful-I’m a little confused how to define a Multi response GP in pymc (still learning the ins and outs!). Even trying to write a row and column parameter matrix in the definition of a MGP is a bit in the confusing side for me
I want to be active in responses and not just ask for example code, so please let me know if I can be more specific. Thank you!
JAB February 13, 2025, 6:20pm 2
This example might help you. It’s a bit slow so it might be worth seeing if you can use HSGP to speed things up. Here are some example notebooks: basic usage, advanced usage. I think Example 2 in the advanced notebook is probably what you are looking for.
brontidon February 13, 2025, 6:57pm 3
thank you! i’ll try it out
Hi, sorry for the lapse in reply, i’ve been shoring up my linear algebra and some of the theory in rassumussen to help with some development
i have what probably amounts to a silly question, but in Gaussian Processes: HSGP Advanced Usage — PyMC example gallery, this sequence of code confuses me
f_true = (
pm.draw(pm.MvNormal.dist(mu=np.zeros(n_gps * n_t), cov=K), random_seed=rng)
.reshape(n_gps, n_t)
.T
)
# Additive gaussian noise
sigma_noise = 0.5
noise_dist = pm.Normal.dist(mu=0.0, sigma=sigma_noise)
y_obs = f_true + pm.draw(noise_dist, draws=n_t * n_gps, random_seed=rng).reshape(n_t, n_gps)
As I understand, f_true should be a mvG(3000,3000^2). So this draw should just be a sample in R^3000. I do not understand the reshape call right here, the only thing I can think of is that reshaping in this manner just allows us to more easily store the (time, process) index for numerical efficiency.