-
Notifications
You must be signed in to change notification settings - Fork 69
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
base: main
Are you sure you want to change the base?
Make basic INLA interface and simple marginalisation routine #533
Conversation
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
398979a
to
c6010f3
Compare
dad163c
to
a473e87
Compare
…+-marginalisation-routine
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.
Just docstring suggestions for now.
*args, | ||
Q: TensorVariable, | ||
minimizer_seed: int, | ||
minimizer_kwargs: dict = {"method": "L-BFGS-B", "optimizer_kwargs": {"tol": 1e-8}}, |
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 may create unpredictable behavior if any changes are made to the minimizer kwargs. Let's make None
the default argument and add a conditional for the default kwargs.
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 believe I coded it up like that originally but Theo had the exact opposite opinion haha, thoughts @theorashid ?
|
||
# logp(y | x, params) | ||
log_likelihood = pt.sum( | ||
[logp_term.sum() for value, logp_term in logps_dict.items() if value is not marginalized_vv] |
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.
pt.switch
could work for this I think.
Addresses #532 and #344.
Relies on pymc-devs/pytensor#1582.