pymc-devs / pymc

Bayesian Modeling and Probabilistic Programming in Python
https://docs.pymc.io/
Other
8.53k stars 1.98k forks source link

Implement `compute_log_prior` utility #7149

Closed aloctavodia closed 5 months ago

aloctavodia commented 5 months ago

Add compute_log_prior function. the log_prior values are needed for prior sensitivity checks as described in this paper https://arxiv.org/abs/2107.14054. Part of the functionality described in that paper is already implemented in ArviZ.


πŸ“š Documentation preview πŸ“š: https://pymc--7149.org.readthedocs.build/en/7149/

aloctavodia commented 5 months ago

sure, we just need to rename log_likelihood.py to log_density.py or something similar and fix a few imports.

codecov[bot] commented 5 months ago

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (627a8dd) 90.41% compared to head (47025f0) 91.92%.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/pymc-devs/pymc/pull/7149/graphs/tree.svg?width=650&height=150&src=pr&token=JFuXtOJ4Cb&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pymc-devs)](https://app.codecov.io/gh/pymc-devs/pymc/pull/7149?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pymc-devs) ```diff @@ Coverage Diff @@ ## main #7149 +/- ## ========================================== + Coverage 90.41% 91.92% +1.50% ========================================== Files 101 101 Lines 16930 16945 +15 ========================================== + Hits 15308 15576 +268 + Misses 1622 1369 -253 ``` | [Files](https://app.codecov.io/gh/pymc-devs/pymc/pull/7149?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pymc-devs) | Coverage Ξ” | | |---|---|---| | [pymc/stats/\_\_init\_\_.py](https://app.codecov.io/gh/pymc-devs/pymc/pull/7149?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pymc-devs#diff-cHltYy9zdGF0cy9fX2luaXRfXy5weQ==) | `100.00% <100.00%> (ΓΈ)` | | | [pymc/stats/log\_density.py](https://app.codecov.io/gh/pymc-devs/pymc/pull/7149?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pymc-devs#diff-cHltYy9zdGF0cy9sb2dfZGVuc2l0eS5weQ==) | `98.30% <96.55%> (ΓΈ)` | | | [pymc/backends/arviz.py](https://app.codecov.io/gh/pymc-devs/pymc/pull/7149?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pymc-devs#diff-cHltYy9iYWNrZW5kcy9hcnZpei5weQ==) | `96.07% <60.00%> (-0.93%)` | :arrow_down: | ... and [10 files with indirect coverage changes](https://app.codecov.io/gh/pymc-devs/pymc/pull/7149/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pymc-devs)