cornellius-gp / gpytorch

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

How to define a likelihood of a mixture model? #1325

Open tumble-weed opened 3 years ago

tumble-weed commented 3 years ago

Hi, I want to create a mixture of 2 gaussian processes G1 and G2, where the mixing ratio comes from a gaussian process with a bernoulli likelihood B. it involves 3 gaussian processes, G1,G2 and B , where the posterior will be G1 B + (1-B) G2 (similar but simpler than the idea in this paper: https://papers.nips.cc/paper/1900-mixtures-of-gaussian-processes.pdf). i am not sure if this is simple to do in gpytorch, any help would be appreciated

jacobrgardner commented 3 years ago

@tumble-weed I think this should be straightforward if you use our Pyro interface, which should let you define this model and do inference pretty easily. We have examples of our Pyro integration here: https://github.com/cornellius-gp/gpytorch/tree/master/examples/07_Pyro_Integration

tumble-weed commented 3 years ago

thanks, i will take a look