Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GP Likelihood classes #195

Open
marpulli opened this issue Jul 12, 2019 · 0 comments
Open

GP Likelihood classes #195

marpulli opened this issue Jul 12, 2019 · 0 comments

Comments

@marpulli
Copy link
Contributor

marpulli commented Jul 12, 2019

Is your feature request related to a problem? Please describe.
The SVGP and DGP modules should be able to work with alternative likelihoods. They are both currently implemented for Gaussian likelihoods only. The ability to switch out likelihoods would make things like #126 much simpler with less code duplication.

Describe the solution you'd like
Currently:

m = Model()
m.X = Variable()
m.noise_var = Variable(transformation=PositiveTransformation())
m.Y = SVGP.define_variable(m.X, kern, m.noise_var...)

I'd like something more like

m = Model()
m.X = Variable()
m.noise_var = Variable(transformation=PositiveTransformation())
m.likelihood = NormalGPLikelihood(variance)
# This could also be: 
# m.likelihood = BernoulliGPLikelihood()
m.Y = SVGP.define_variable(m.X, kern, m.likelihood...)

These likelihoods would need to be able to compute: where p(f) is Gaussian.

class BernoulliGPLikelihood(GPLikelihood):
    # This class would also contain the transformation of the 
    # latent function to the interval [0, 1] I think
   def expectation(self, mean, variance, data): 
       # This method would implement the quadrature rule to do this here

class NormalGPLikelihood(GPLikelihood):
   def expectation(self, mean, variance, data): # think of a better name!
       # This method could use the analytically equation

Describe alternatives you've considered
Creating a new class might not be necessary, we might be able to reuse the current distribution objects directly.

I would be happy to implement this, if we come up with a design which people are happy with first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant