Skip to content
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

Add find_MAP with close JAX integration and fix bug with Laplace fit #385

Merged
merged 21 commits into from
Dec 4, 2024
Merged
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
6aa20f7
Add JAX-based `find_MAP`
jessegrabowski Oct 27, 2024
7ed3b2f
add `better_optimize` to CI envs
jessegrabowski Oct 27, 2024
e412f6f
Fix relative import
jessegrabowski Oct 27, 2024
f9b6258
Remove `find_MAP` import from module-level `__init__.py`
jessegrabowski Oct 27, 2024
ad3abd9
Update docstring
jessegrabowski Oct 27, 2024
be1d790
Allow calling `find_MAP` inside model context without model argument
jessegrabowski Oct 27, 2024
923eb26
Required patched better_optimize
jessegrabowski Oct 27, 2024
f705d43
in-progress refactor
jessegrabowski Nov 30, 2024
a23762b
More refactor
jessegrabowski Dec 3, 2024
2d21403
Generalize code to use any pytensor backend
jessegrabowski Dec 3, 2024
4c2529d
Reconcile the two laplace approximation functions
jessegrabowski Dec 3, 2024
07ebe40
Use absolute import in doctest
jessegrabowski Dec 3, 2024
b40e101
Fix imports
jessegrabowski Dec 4, 2024
bc340c2
Fix unrelated statespace test
jessegrabowski Dec 4, 2024
da338bf
- Rename argument `use_jax_gradients` -> `gradient_backend`
jessegrabowski Dec 4, 2024
3ebbf20
Fix typo introduced by rename refactor
jessegrabowski Dec 4, 2024
2035202
use `mode=FAST_COMPILE` to get `unobserved_value_vars` after MAP opti…
jessegrabowski Dec 4, 2024
f2504e9
Rename `test_jax_find_map.py` -> `test_find_map.py`
jessegrabowski Dec 4, 2024
a81079b
Improve docstring for `fit_laplace`
jessegrabowski Dec 4, 2024
4d88343
Update tests to match new signature
jessegrabowski Dec 4, 2024
9b1cd0e
Update docstring
jessegrabowski Dec 4, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix unrelated statespace test
jessegrabowski committed Dec 4, 2024
commit bc340c257f191d0fa933d73fcec7cb74ace8467e
2 changes: 1 addition & 1 deletion tests/statespace/test_ETS.py
Original file line number Diff line number Diff line change
@@ -408,4 +408,4 @@ def test_ETS_stationary_initialization():
R, Q = outputs["selection"], outputs["state_cov"]
P0_expected = linalg.solve_discrete_lyapunov(T_stationary, R @ Q @ R.T)

assert_allclose(outputs["initial_state_cov"], P0_expected)
assert_allclose(outputs["initial_state_cov"], P0_expected, rtol=1e-8, atol=1e-8)