-
-
Notifications
You must be signed in to change notification settings - Fork 126
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
documentation on custom prior #656
Conversation
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
@@ -662,7 +662,6 @@ | |||
] |
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.
For the first paragraph I would say
Bambi's priors are a thing layer on top of PyMC distributions. If you want to ask for a prior distribution by name, it must be the name of a PyMC distribution. But sometimes we want to use more complex distributions as priors. For all those cases, Bambi's Prior class allow users to pass a distribution that returns the new prior. See the following example:
Then I would say
The example above is trival because it's just a wrapper of the pm.Normal
distribution. But we can use this pattern to construct more complex distributions, such as a Truncated Laplace distribution.
And finally, close with
In summary, custom priors allow for greater flexibility by combining existing PyMC distributions in different ways. If you need to use a distribution that's not implemented in PyMC, please check the following link.
Reply via 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.
@SuryaMudimi thanks a lot for the contribution! See the suggestions I left :)
Just minor comments I suggested "allow users to pass a distribution that returns the new prior" it should be "allow users to pass a function that returns a distribution that will be used as the prior" Also
Should be
note the lowercase in "please" and the space after the link |
Codecov Report
@@ Coverage Diff @@
## main #656 +/- ##
==========================================
+ Coverage 87.56% 87.62% +0.06%
==========================================
Files 40 40
Lines 2629 2650 +21
==========================================
+ Hits 2302 2322 +20
- Misses 327 328 +1
... and 1 file with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
made those corrections. |
Thanks!! I will merge after the checks run. |
* documentation on custom prior * changes as suggeted by Tomás * minor changes
* import bambi as bmb in tests * documentation on custom prior (#656) * documentation on custom prior * changes as suggeted by Tomás * minor changes * fixed failed tests b/c of regex match copy and paste mistake --------- Co-authored-by: Surya Mudimi <surya.mudimi@gmail.com>
added how to specify custom prior documentation in getting started under "Specifying priors" section