-
Notifications
You must be signed in to change notification settings - Fork 246
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
example: multidimensional HSGP #1801
example: multidimensional HSGP #1801
Conversation
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
@brendancooley This extension is fantastic! Regarding your suggestion:
In my opinion, this would be the way to go! Extend the current HSGP module functions to support the multidimensional case. As we have already uni-tests in place, we could add these new cases and make sure we still support the one-dimensional case. After that we could showcase in your example notebook how to use the API. Really exciting 🙌 |
Awesome, will get moving on this |
Converted to draft, will refactor to reflect changes in #1803 and re-open when ready |
7b7b799
to
bb0b494
Compare
wip(hsgp_nd): writeup results for baseline, add mcmc options wip(hsbp_nd): complete writeup docs(numpyro): add hsgp_nd_example wip(hsgp_nd): patch up example wip(hsgp_nd): cleanup/re-run nb wip(hsgp_nd): final cleanup
678a5ff
to
c78ce85
Compare
@fehiepsi @juanitorduz ready for review here. |
View / edit / reply to this conversation on ReviewNB juanitorduz commented on 2024-06-03T08:51:49Z Can you provide some intro before this cell to prepare the reader what to expect? :) For example, the paragraph below can be moved up (or the first part of it) |
View / edit / reply to this conversation on ReviewNB juanitorduz commented on 2024-06-03T08:51:50Z Line #4. import numpy as np Shall we move all the imports to the first cell? |
View / edit / reply to this conversation on ReviewNB juanitorduz commented on 2024-06-03T08:51:51Z Line #6. Again, it would be nice to leat the reader know what to expect. Something like: "Next, we implement some plotting functions to allow us visualize the data..." |
View / edit / reply to this conversation on ReviewNB juanitorduz commented on 2024-06-03T08:51:51Z I think it would be nice to have the trace plots as in https://num.pyro.ai/en/stable/tutorials/hsgp_example.html and we can compare the infered parameters from netween models (the exact and approximation) and show the approximation does recover the expected parameters. |
View / edit / reply to this conversation on ReviewNB juanitorduz commented on 2024-06-03T08:51:52Z The HSGP model is much better ... why do you think this is the case as compared with the exact one? Or is it just the plot? brendancooley commented on 2024-06-03T21:02:17Z Ah to clarify -- this is the HSGP versus the exact (not HSGP versus True). So this is just showing that their posterior predictive means line up for all data points. I will make sure I clarify, easy to see why you would think that. |
@brendancooley This example looks great! I left some small comments and suggestions. I would suggest a bit more content on the storyline between cells to guide a non-expert reader through the content. Not really about the HSGP approximation but more about the connection between the sections. Just a suggestion :) |
Thanks for the prompt feedback! Agree that it ended up a little terse...I'll try and fill in some words between those monstrous matplotlib functions and add some extra comparisons between the models. Will reach back when comments have been addressed. |
Ah to clarify -- this is the HSGP versus the exact (not HSGP versus True). So this is just showing that their posterior predictive means line up for all data points. I will make sure I clarify, easy to see why you would think that. View entire conversation on ReviewNB |
Added trace plots from arviz for both the exact model and the approximation, and a density plot to compare the approximation to the exact model. Took the time to write better expositions for each of the code blocks. Thanks to @juanitorduz for the prodding and helpful feedback. @fehiepsi believe this is ready to go. |
View / edit / reply to this conversation on ReviewNB juanitorduz commented on 2024-06-05T18:41:08Z It seems we are having some divergences, maybe you try increasting |
Hey @brendancooley it looks great! I left a comment to see if we can get rid of these divergences. Besides that, it looks great! |
@juanitorduz bumped the
and trace plots look better. It runs so fast that experimentation is a breeze! |
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 great! Thanks !
View / edit / reply to this conversation on ReviewNB fehiepsi commented on 2024-06-09T14:48:27Z Could you add a cell brendancooley commented on 2024-06-09T16:41:17Z done! |
done! View entire conversation on ReviewNB |
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.
Great tutorial, thanks @brendancooley!
Also thanks for reviewing, @juanitorduz!
(are we waiting for additional reviews 😄 ?) |
Adds an example to extend the existing HSGP tutorials (1 and 2) to multidimensional inputs.
While I was working on this I noticed that @juanitorduz contributed a really nice module with a bunch of utility functions for HSGPs. Very happy to see these making their way into
numpyro
. I think a natural next step would be to take on Juan's call to adapt his eigenfunctions/values implementations to the multidimensional case. I believe I have a good implementation in the notebook that I have tested for D=1 and D=2 but certainly welcome feedback from him and others in the community (@omarfsosa ?).Perhaps before merging this I could extend the HSGP contrib module to support multidimensional inputs, and then refactor this notebook and the other HSGP tutorials to import the supporting functionality from the contrib module. Suggestions very welcome.