Comments (8)
I guess the predict
method should just always output predictive mean and variance. Then we can have another method specific to HMC-based GPs that returns samples from the HMC posterior.
from gpax.
In fact, we can have .sample_from_posterior()
method for all GPs that it will output samples of the shape (M, N, len(X_new)). For the HMC-based GPs, M is equal to the number of HMC posterior samples and for SVI-based GPs M is equal to 1.
from gpax.
Happy to attempt a fix if you'd like.
from gpax.
In the beginning, both ExactGP and viGP used to output identical shapes. However, while y_sampled
in ExactGP makes sense since each sample comes from a different HMC sample with kernel hyperparameters, the y_sampled
in viGP is sampled from the same single point estimate of the kernel hyperparameters, which makes it pretty noisy. Hence, for practical purposes, viGP returns the predictive variance values directly.
That said, there is certainly an "asymmetry" between fully Bayesian and variational inference tools currently available. I need to think a bit more about how to address it from the design point of view.
from gpax.
@ziatdinovmax I see what you're saying but ultimately doesn't it make more sense from a design standpoint to have a common interface? It's going to make building tools on top of what you already have really difficult if each of the GP's predict
method returns something different.
IMO making this really clear in the docs but implementing the consistent method is the way to go. That way, a GP that inherits some base ABC has totally known behavior when calling predict
(which naturally will make e.g. building the campaigning library much easier).
from gpax.
@matthewcarbone - adding it to the v0.3 'milestone' per our discussion
from gpax.
@ziatdinovmax yup sounds good. To be clear this would actually be a backwards-incompatible change (technically), since the shape of the predict
method would change. Should we make such a change, or should we add a new method which returns a consistent shape between the GP methods?
from gpax.
Perfect, I really like the idea of sample_from_posterior()
.
from gpax.
Related Issues (20)
- Cost-aware BO HOT 1
- UIGP: Allow for different variance along different input feature dimensions HOT 1
- Add explanation/examples on how to use utils.priors HOT 1
- Option to use regular NN in viDKL HOT 1
- Sparse GP HOT 1
- Minor issue regarding importing sPM model HOT 2
- Move `priors` out of utils HOT 1
- Set noise prior automatically HOT 3
- Custom BNN architectures for a fully Bayesian DKL HOT 1
- Problem with models.sPM? HOT 1
- Use of viMTDKL HOT 5
- import priors might be missing from __init__
- Build references in readme are broken
- Fix bug where I use the master branch instead of main in CI
- Google Colab giving version control error. HOT 9
- Remove jaxopt from pyproject requirements? HOT 1
- Remove requirements.txt? HOT 1
- Suggestion: activate dependabot
- Fix documentation building HOT 5
- Test the new deployment system on the test PyPI server
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gpax.