-
Notifications
You must be signed in to change notification settings - Fork 8
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
Added glm.py examples in docstrings #249
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## development #249 +/- ##
===============================================
+ Coverage 97.09% 97.23% +0.14%
===============================================
Files 20 21 +1
Lines 1857 1884 +27
===============================================
+ Hits 1803 1832 +29
+ Misses 54 52 -2 ☔ View full report in Codecov by Sentry. |
Pranati was having an issue where running |
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.
This is almost good to go but we should have an example in the fit
method of PopulationGLM, since it overrides the GLM one.
Updates made:
|
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.
This looks good! Couple more user-facing functions need examples, though @BalzaniEdoardo maybe some of these can be made private?
cast_to_jax
initialize_state
General notes:
- While it's fine to have the imports in the examples right above where they get used, I think it's more standard to have all imports at the top (that's how scripts and notebooks are generally written) -- any particular reason you didn't do it that way?
For the comment about ordering the import statements -- I didn't put them all at the top and instead put them in the order that they are called just because I thought it would be easier for someone who didn't really understand the imports to see exactly how they are being used. But because the examples aren't too lengthy or technical, I can change the imports to the regular standard. Let me know! Added an example to |
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.
Last very small round of comments, and then this is good to be merged. Thanks Pranati, very good job on this
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 still think the definition of size for Xnew should be changed, but otherwise this looks good to me!
Co-authored-by: William F. Broderick <[email protected]>
Co-authored-by: William F. Broderick <[email protected]>
Let's make 'cast_to_jax' private, keep 'initialize_state' public since batching as we have it now requires the user to call the method, if you check the relative how to guide in the docs. |
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.
All looks good to me, thanks for your work on this Pranati!
@BalzaniEdoardo should we open an issue about making cast_to_jax
private? (doing that probably doesn't belong here)
Thanks @pranmod01! |
This PR adds examples for the
glm.py
public-facing commands. I added examples of how the function might be used with different parameters to get different results.To be discussed: These are my first set of examples for functions. Because I might not thoroughly understand how these examples might be used in the context of neural data, I'm unsure if I should add more details and scenarios of how the functions can be used.