GAMES-UChile / mogptk

Multi-Output Gaussian Process Toolkit
MIT License
161 stars 42 forks source link

Priors and MCMC sampling #34

Closed j-faria closed 2 years ago

j-faria commented 2 years ago

If I understand correctly, each parameter in the mogptk models (and particularly in MOSM) can be assigned a value, trained/fixed, or assigned a prior distribution.

Regarding the prior, should I assign one of the distributions from torch.distributions to a given parameter? I've tried this, but had to change log_p into log_prob in this line on the Parameter class. Just wondering if this is the intended API.

Another question is if MCMC sampling from the posterior for the model parameters is already implemented or if there is a straightforward way to use the mogptk models with e.g. pyro or pymc3.

tdewolff commented 2 years ago

Hi João, we have some discrepancy between APIs of PyTorch and our own that should be fixed. We're currently very actively developing a new version of the library with additional models (Opper-Archambeau, Snelson, Titsias, Hensman) with sparse and variational support, as well as various likelihoods (Student-T, Laplace, Bernoulli for classification, Gamma, etc.). There is at the moment no support for MCMC using Pyro or pymc3 (we intend to use Pyro in the future, but if possible support for both would be nice).

I've fixed the very line you mention, which will allow using distributions from torch.distributions but also our own at gpr.likelihoods. Please keep in touch for advances on MCMC support!