Skip to content

Make basic INLA interface and simple marginalisation routine #533

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

Open
wants to merge 35 commits into
base: main
Choose a base branch
from

Conversation

Michal-Novomestsky
Copy link
Contributor

@Michal-Novomestsky Michal-Novomestsky commented Jul 2, 2025

Addresses #532 and #344.

Relies on pymc-devs/pytensor#1582 and pymc-devs/pymc#7895.

Currently uses a closed-form solution for a specific case (nested normals) while awaiting pymc-devs/pytensor#1550

Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@Michal-Novomestsky Michal-Novomestsky force-pushed the implement-pmx.fit-option-for-INLA-+-marginalisation-routine branch from 398979a to c6010f3 Compare August 12, 2025 11:05
@Michal-Novomestsky Michal-Novomestsky force-pushed the implement-pmx.fit-option-for-INLA-+-marginalisation-routine branch from dad163c to a473e87 Compare August 12, 2025 11:12
@Michal-Novomestsky
Copy link
Contributor Author

@maresb, @zaxtax suggested that I reach out to you about the Docs not being built. Do you have any ideas why it's failing? Thanks!

@Michal-Novomestsky
Copy link
Contributor Author

pre-commit.ci autofix

@maresb
Copy link
Collaborator

maresb commented Aug 13, 2025

@maresb, @zaxtax suggested that I reach out to you about the Docs not being built. Do you have any ideas why it's failing? Thanks!

Hey @Michal-Novomestsky, thanks for all your work here! I recently returned from travel so I'm just now catching up on my backlog.

I assume you're asking why the Read the Docs workflow is failing? Opening the CI logs and expanding the line with the error displays the following stack trace:

File "/home/docs/checkouts/readthedocs.org/user_builds/pymc-extras/envs/533/lib/python3.11/site-packages/pymc_extras/model/marginal/distributions.py", line 11, in
from pymc.distributions.multivariate import _precision_mv_normal_logp
ImportError: cannot import name '_precision_mv_normal_logp' from 'pymc.distributions.multivariate' (/home/docs/checkouts/readthedocs.org/user_builds/pymc-extras/envs/533/lib/python3.11/site-packages/pymc/distributions/multivariate.py)

Is this helpful?

@Michal-Novomestsky
Copy link
Contributor Author

Michal-Novomestsky commented Aug 13, 2025

I assume you're asking why the Read the Docs workflow is failing? Opening the CI logs and expanding the line with the error displays the following stack trace:

File "/home/docs/checkouts/readthedocs.org/user_builds/pymc-extras/envs/533/lib/python3.11/site-packages/pymc_extras/model/marginal/distributions.py", line 11, in
from pymc.distributions.multivariate import _precision_mv_normal_logp
ImportError: cannot import name '_precision_mv_normal_logp' from 'pymc.distributions.multivariate' (/home/docs/checkouts/readthedocs.org/user_builds/pymc-extras/envs/533/lib/python3.11/site-packages/pymc/distributions/multivariate.py)

Is this helpful?

@maresb Ah yep that makes sense - this PR is dependent on two other PRs in PyMC and Pytensor respectively, so it (and the rest of the unittests) are failing because those haven't been merged yet. Thanks for the help!

@Michal-Novomestsky
Copy link
Contributor Author

pre-commit.ci autofix

@Michal-Novomestsky
Copy link
Contributor Author

Michal-Novomestsky commented Aug 17, 2025

For some reason, /tests/distributions/test_discrete.py::TestGeneralizedPoisson::TestRandomVariable::test_random_lam_expected_moments[2.5] is failing even though it passes locally (local is up to date with remote). It's a test case completely unrelated to this merge (TestGeneralizedPoisson), would greatly appreciate any pointers @ricardoV94 @jessegrabowski @zaxtax .

@Michal-Novomestsky
Copy link
Contributor Author

Ok, just three test cases are failing, which @zaxtax agrees shouldn't be related to the PR itself. Once these are sorted we can merge @ricardoV94 @jessegrabowski

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants