-
Notifications
You must be signed in to change notification settings - Fork 52
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
Abstract integrator #283
Abstract integrator #283
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @thomaspinder, looking good. Like the structure of it. Just left a few thoughts and suggestions.
gpjax/integrators.py
Outdated
gh_points, gh_weights = np.polynomial.hermite.hermgauss(self.num_points) | ||
sd = jnp.sqrt(sigma2) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might be a potential numerical issue to keep an eye on. If sigma2 gets sufficiently small, the gradients will explode.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good @thomaspinder, just minor comment about docstrings, you need likelihood
instead of **likelihood_params
in each integrator class.
Type of changes
Checklist
poetry run pre-commit run --all-files --show-diff-on-failure
before committing.Description
This PR enables users to define their own integration strategy for computing the expected log likelihood under the variational distribution.
Note: A lot of docs have been changed here as
docs/api
had been committed somehwere along the way. The key files that have been changed aregpjax/likelihoods.py
andgpjax/integrators.py
.Issue Number: #270 #282