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

Gamma likelihood: 'NotImplementedError: Must be implemented for likelihoods with parameters to be optimized' #1037

Open
Valkje opened this issue Oct 11, 2023 · 1 comment

Comments

@Valkje
Copy link

Valkje commented Oct 11, 2023

Trying to use the gamma likelihood with Laplace approximation fails:

lik = GPy.likelihoods.Gamma()
inf = GPy.inference.latent_function_inference.Laplace()

m_gam = GPy.core.GP(X, Y, kern, lik, inference_method=inf)
...in Likelihood.update_gradients(self, partial)
    102 def update_gradients(self, partial):
    103     if self.size > 0:
--> 104         raise NotImplementedError('Must be implemented for likelihoods with parameters to be optimized')

NotImplementedError: Must be implemented for likelihoods with parameters to be optimized

I would be happy to contribute and implement this functionality for the Gamma class. The documentation, however, is rather brief, which makes it difficult to help. E.g., what is partial and what are we trying to calculate with it? Any hints would be much appreciated.

(Afterthought: I think this package is brilliant work and good at what it does, but one of the points it can improve upon is documentation (even though I immediately admit that maintaining large bodies of documentation is a lot of work). But that's beside the point now.)

@MartinBubel
Copy link
Contributor

Hi @Valkje
thanks for raising the issue and your willingness to contribute.

I'm totally with you in terms of the absence of documentation in many areas. Unfortunately I jumped in just recently and am not familiar with the backend --> so I cannot help with that at the moment ... at least not without digging into this but I'm busy with general maintenance updates at the moment.

I'll put the discussion flag on this issue and let's hope that some of the developers may have a look at it and join with helpful info.

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

No branches or pull requests

2 participants