-
Notifications
You must be signed in to change notification settings - Fork 11
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
Add implementation of Functional Neural Process #187
Conversation
This commit moves a lot of the code that was in the onedim.py file into the main fnp.py file. This lets us write tests using the one dimensional FNP example Squashed commit of the following: commit 0db2d3e032d9e8fd4481a8311379234b57c6384f Author: Derek Hansen <dereklh@umich.edu> Date: Fri Jan 22 16:06:36 2021 -0500 Incorporated the one dimensional example as a unit test for FNP commit cda0ce36ff39f49cc2c19ef27dba796ceaf47740 Author: Derek Hansen <dereklh@umich.edu> Date: Fri Jan 22 15:37:44 2021 -0500 Got the RegressionFNP tested in one dimensional case commit 754c9093abae98915db50da1e81bbd1e0a3d6450 Author: Derek Hansen <dereklh@umich.edu> Date: Fri Jan 22 14:17:46 2021 -0500 Moved onedim training and visualize to fnp.py commit 41aa5921416fcded2a55a97ef208dc0baf934fd1 Author: Derek Hansen <dereklh@umich.edu> Date: Fri Jan 22 14:11:03 2021 -0500 Made od an argument rather than global commit 5dd7c50be4479d8c8b5bbf569d747e36c21ed75b Author: Derek Hansen <dereklh@umich.edu> Date: Fri Jan 22 14:06:23 2021 -0500 Moved OneDimDataset into fnp.py commit 263f8397be6ecba7faba758691ae501fa6b8161c Author: Derek Hansen <dereklh@umich.edu> Date: Fri Jan 22 14:01:56 2021 -0500 ensure that the indices match those from before commit 2c22b0d438a6fb81a76ceb0eb988ff48f24d4917 Author: Derek Hansen <dereklh@umich.edu> Date: Fri Jan 22 13:51:59 2021 -0500 Deleted old onedim dataset code commit dc90af2fc86ab50e14d90a77e02f329456d3496e Author: Derek Hansen <dereklh@umich.edu> Date: Fri Jan 22 13:18:31 2021 -0500 Moved onedim dataset into a class
Squashed commit of the following: commit d7695879fad3f469305df2bb0b3c09e49b33a425 Author: Derek Hansen <dereklh@umich.edu> Date: Fri Jan 22 18:38:32 2021 -0500 Added test of star rotation commit 5ef52ce57e9dcef42ef4421033a4c41a6d7b153e Author: Derek Hansen <dereklh@umich.edu> Date: Fri Jan 22 17:26:01 2021 -0500 Moved rotate_dgp.py code into fnp.py
Codecov Report
@@ Coverage Diff @@
## master #187 +/- ##
==========================================
+ Coverage 96.29% 96.58% +0.29%
==========================================
Files 13 15 +2
Lines 1672 1963 +291
==========================================
+ Hits 1610 1896 +286
- Misses 62 67 +5
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
e6848a7
to
d03ee9e
Compare
|
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.
Nice. This is very readable code. Good to wait for reviews from @ismael-mendoza and @Runjing-Liu120 before merging since this is such a major PR (although much more manageable now that I see how it is organized)
Looks good to me. @ismael-mendoza @Runjing-Liu120 if you have feedback please try to weigh in sometime today |
Looks good to me, too. The hard part will be figuring out how to add this to our wake.py / decoder.py files -- we'll have to think carefully about that. But this is great so far! |
Hi @jeff-regier and @dereklhansen , I'll be done with my review shortly |
There seems to be a problem with the CI environment that is causing the latest tests to fail. The latest commit I pushed shouldn't have caused this error. I found a bug report on the poetry repo (issue 3650) |
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 really good @dereklhansen, thanks for adding this code. I just had a couple of suggestions/questions.
I added a fix for the poetry CI issues in #210 |
All math functions can be taken from numpy instead FNP.encode didn't actually need to have two separate pathways for inference and prediction
This adds an implementation of the Functional Neural Process (FNP) to the repo.
In addition to the implementation of FNP, this PR currently adds two working examples of the FNP on synthetic data (located in 'case_studies/fnp':