pymc-devs / pymc

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

Improve HSGP and ZeroInflated / Hurdle distributions docs #7189

Closed AlexAndorra closed 6 months ago

AlexAndorra commented 7 months ago

Description

Just a small PR to improve and fix some typos in the doc pages of:

Ready for review and merge

Checklist

Type of change


📚 Documentation preview 📚: https://pymc--7189.org.readthedocs.build/en/7189/

codecov[bot] commented 7 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 91.84%. Comparing base (244fb97) to head (2c279ba).

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/pymc-devs/pymc/pull/7189/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/7189?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 #7189 +/- ## ========================================== - Coverage 92.26% 91.84% -0.43% ========================================== Files 100 100 Lines 16880 16880 ========================================== - Hits 15574 15503 -71 - Misses 1306 1377 +71 ``` | [Files](https://app.codecov.io/gh/pymc-devs/pymc/pull/7189?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pymc-devs) | Coverage Δ | | |---|---|---| | [pymc/distributions/mixture.py](https://app.codecov.io/gh/pymc-devs/pymc/pull/7189?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pymc-devs#diff-cHltYy9kaXN0cmlidXRpb25zL21peHR1cmUucHk=) | `95.08% <ø> (ø)` | | | [pymc/gp/hsgp\_approx.py](https://app.codecov.io/gh/pymc-devs/pymc/pull/7189?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pymc-devs#diff-cHltYy9ncC9oc2dwX2FwcHJveC5weQ==) | `95.62% <ø> (ø)` | | ... and [3 files with indirect coverage changes](https://app.codecov.io/gh/pymc-devs/pymc/pull/7189/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pymc-devs)
AlexAndorra commented 7 months ago

Failing test seems completely unrelated. Should I just rerun it?

AlexAndorra commented 7 months ago

Empirical on my side, but I know Bill also told me that. I'm guessing this is similar to the fact that the centered Normal parametrization works better in a hierarchical model for groups which have a lot of data

El El lun, 11 mar 2024 a la(s) 17:09, Juan Orduz @.***> escribió:

@.**** commented on this pull request.

In pymc/gp/hsgp_approx.py https://github.com/pymc-devs/pymc/pull/7189#discussion_r1520368416:

  • The centered approximation can be more efficient when

  • the GP is stronger than the noise

  • beta = pm.Normal("beta", sigma=sqrt_psd, size=gp._m_star)

  • f = pm.Deterministic("f", phi @ beta)

Out of curiosity: is this something empirical, or is there a general statement about it? :)

— Reply to this email directly, view it on GitHub https://github.com/pymc-devs/pymc/pull/7189#pullrequestreview-1929102936, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHIJMTD5QI4GU7JWS4D4X7TYXYFNZAVCNFSM6AAAAABEPONYL6VHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMYTSMRZGEYDEOJTGY . You are receiving this because you were assigned.Message ID: @.***>

ricardoV94 commented 6 months ago

@AlexAndorra small nitpick, would have been better to have two separate commits for the two unrelated changes (Mixture, HSGP)

AlexAndorra commented 6 months ago

True. Noted for next time @ricardoV94