cornellius-gp / gpytorch

A highly efficient implementation of Gaussian Processes in PyTorch
MIT License
3.58k stars 562 forks source link

How to pass a sampled posterior for kernel hyperparameters from first iteration as prior for second iteration of fitting? #1188

Open akjagadish opened 4 years ago

akjagadish commented 4 years ago

I fit a fully-Bayesian GP to some data and get samples for the kernel parameters from MCMC. I would like to pass this sampled posterior as prior to the next round of fitting. The idea is to see if the kernel parameters converge and the model learns faster.

Please let me know if you have any ideas. Thanks a lot :)

jacobrgardner commented 4 years ago

I mean at the end of the day, the hypers are sampled from a Markov chain, so you could probably just load the most recently generated sample in to the model and start running NUTS / optimization from there. Maybe there's some internal state in Pyro that could be kept around for efficiency, but I'm not sure how valuable that would really be.

Is that roughly what you mean?