-
-
Notifications
You must be signed in to change notification settings - Fork 269
Heteroskedastic GPs notebook #161
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
Conversation
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
I just skimmed but this looks awesome - thanks so much! @drbenvincent or @bwengals: do you have time to take a look? |
I can take a look. I've not used GP's, so my comments would probably be restricted to clarity / accessibility. |
View / edit / reply to this conversation on ReviewNB drbenvincent commented on 2021-05-21T16:08:35Z result -> results JohnGoertz commented on 2021-05-22T18:52:58Z Fixed! |
View / edit / reply to this conversation on ReviewNB drbenvincent commented on 2021-05-21T16:08:36Z Would JohnGoertz commented on 2021-05-21T16:21:06Z Yeah, true, I got in the habit of the |
View / edit / reply to this conversation on ReviewNB drbenvincent commented on 2021-05-21T16:08:36Z It's probably with increasing JohnGoertz commented on 2021-05-21T16:21:33Z I'll give that a shot, good call. JohnGoertz commented on 2021-05-22T18:55:42Z Yeah, I had to go up to 0.95 to get down to only a couple dozen divergences for each Latent model. Unfortunately roughly doubled sampling time, so I made a note at the end pointing out the trade-off. drbenvincent commented on 2021-05-22T19:59:41Z Sounds good |
View / edit / reply to this conversation on ReviewNB drbenvincent commented on 2021-05-21T16:08:37Z Any reason to manually define rather than use the commented out line? JohnGoertz commented on 2021-05-21T16:23:37Z Initially, I hadn't figured out how to make the OriolAbril commented on 2021-05-22T11:11:42Z This is also probably worth an issue. JohnGoertz commented on 2021-05-22T19:06:52Z Yeah, it should be easy enough to fix, I can raise an issue and try to fix it myself by just inserting a call to
I found that the LMC implementation was actually quite sensitive to the placement of inducing points. Many initializations from kmeans led to zero-gradient errors (in particular in |
View / edit / reply to this conversation on ReviewNB drbenvincent commented on 2021-05-21T16:08:37Z Same point... It's probably with increasing JohnGoertz commented on 2021-05-22T19:08:03Z I got this down to 20 divergences with |
View / edit / reply to this conversation on ReviewNB drbenvincent commented on 2021-05-21T16:08:38Z Same point again about divergences OriolAbril commented on 2021-05-22T11:15:07Z Also seeing the ess warning, we should check ess and quantile ess and probably use a less extreme CI probability. Estimating the 95% one with less than 200 ess on some parameters is not a good idea. JohnGoertz commented on 2021-05-22T19:16:50Z Increasing |
View / edit / reply to this conversation on ReviewNB drbenvincent commented on 2021-05-21T16:08:38Z This feels a bit out of place here, especially without a brief explanation. It looks like it's not just a larger version of the last right hand subplot? JohnGoertz commented on 2021-05-21T17:05:27Z Admittedly, this was a bit of a hacky way for me to get around this issue with the way thumbnails are generated for the gallery page. The current behavior probably would have caused the thumbnail to crop the final three-panel figure down to just the middle panel, which I felt wasn't the most representative. I can try to find a way around it... |
View / edit / reply to this conversation on ReviewNB drbenvincent commented on 2021-05-21T16:08:39Z I don't know how strict people are about conforming to the suggested watermark in the style guide JohnGoertz commented on 2021-05-21T16:30:22Z Woops, added the |
Yeah, true, I got in the habit of the View entire conversation on ReviewNB |
I'll give that a shot, good call. View entire conversation on ReviewNB |
Initially, I hadn't figured out how to make the View entire conversation on ReviewNB |
Woops, added the View entire conversation on ReviewNB |
Admittedly, this was a bit of a hacky way for me to get around this issue with the way thumbnails are generated for the gallery page. The current behavior probably would have caused the thumbnail to crop the final three-panel figure down to just the middle panel, which I felt wasn't the most representative. I can try to find a way around it... View entire conversation on ReviewNB |
this is REALLY cool |
This is also probably worth an issue. View entire conversation on ReviewNB |
Also seeing the ess warning, we should check ess and quantile ess and probably use a less extreme CI probability. Estimating the 95% one with less than 200 ess on some parameters is not a good idea. View entire conversation on ReviewNB |
View / edit / reply to this conversation on ReviewNB OriolAbril commented on 2021-05-22T11:19:56Z I would probably remove the jedi config and let users choose whatever they want JohnGoertz commented on 2021-05-22T19:17:51Z Oh good point. Jedi wasn't behaving for me, so that's boilerplate code for me, I'll take it out. |
View / edit / reply to this conversation on ReviewNB OriolAbril commented on 2021-05-22T11:19:56Z I am not too familiar with gp functions so I don't know how good/bad dims integration is with them. We should use dims (either at model definition or via
It may also be worth it to tackle this in a follow-up PR, right now I'm mostly trying to gauge how much work will that be as well as how much (if any) extra clarity it can provide (the notebook is already amazing). |
Fixed! View entire conversation on ReviewNB |
Yeah, I had to go up to 0.95 to get down to only a couple dozen divergences for each Latent model. Unfortunately roughly doubled sampling time, so I made a note at the end pointing out the trade-off. View entire conversation on ReviewNB |
Yeah, it should be easy enough to fix, I can raise an issue and try to fix it myself by just inserting a call to
I found that the LMC implementation was actually quite sensitive to the placement of inducing points. Many initializations from kmeans led to zero-gradient errors (in particular in View entire conversation on ReviewNB |
I got this down to 20 divergences with View entire conversation on ReviewNB |
Increasing View entire conversation on ReviewNB |
Oh good point. Jedi wasn't behaving for me, so that's boilerplate code for me, I'll take it out. View entire conversation on ReviewNB |
Sounds good View entire conversation on ReviewNB |
Okay, I've re-run with a higher |
All my points were addressed, this all looks great to me. But I'm not experienced with GP's, so I think this notebook just needs a final check over from someone with more GP knowledge? |
Thanks @JohnGoertz and @drbenvincent! |
That's great, thanks for looking it over and glad to contribute! |
Description
Several other GP frameworks (namely GPflow and GPy have examples
of how to model heteroskedasticity with GPs, but PyMC3 doesn't. There are hints scattered throughout the Discourse on how to do so via latent GPs through sparse approximations and/or coregionalization, but these largely rely on external links and aren't collected in one place.
I've put together a notebook that works through various ways to achieve this. Let me know if there are any changes or extensions you'd like to see!