-
Notifications
You must be signed in to change notification settings - Fork 14
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
Fix GP Demos #236
Fix GP Demos #236
Conversation
Bugfixes to correct the GP demos to ensure that they run with the new implementation. Changes include - Update Patsy integration to allow using formulae with LHS
This commit updates several of the demos to work with the new interface to the GP class. In particular, priors and mean functions had to be changed, and some additional calls to the validation methods have been used to replace existing validation code. Note that the MICE code does not currently work with the new interface, as this will require some re-working of the code. This demo has been left unchanged.
Fixes a bug that arises when a LHS is provided for a formula. Corrected the code and added a unit test that catches this situation.
Corrected the gp_demo.R file to correctly use the new prior interface. Verified that the demo runs correctly and can be used as an example script.
Test file to run all demos doesn't currently work due to issues with RNG and plot displays, so I am removing from the index for the time being. This issue will be addressed at another time.
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, and all the tests and demos run both on my machine and on CSD3.
For completeness, I will add a couple of lines to test_GaussianProcessGPU_init
in test_GaussianProcess.py
checking that the GPU version can also cope with patsy formulas with a LHS.
@@ -55,6 +55,9 @@ def test_GaussianProcess_init(x, y): | |||
gp = GaussianProcess(x, y, mean="x[0]") | |||
assert gp._dm.shape == (2, 2) | |||
|
|||
gp = GaussianProcess(x, y, mean="y ~ x[0]") |
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.
I should add a couple of lines to the GPU version of this test, to check that it can also deal with a LHS of a patsy formula (it can, I just checked by hand, but good to have it in the tests too...)
Bugfixes to correct the GP demos to ensure that they run with the new
implementation. Addresses issues #234, #235. Changes include:
gp_demos.py
gp_demo.R
excalibur_workshop_demo.py
gp_kernel_demos.py
multioutput_tutorial.py