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

update logreg laplace to use bijax #1077

Open
murphyk opened this issue Jul 26, 2022 · 3 comments
Open

update logreg laplace to use bijax #1077

murphyk opened this issue Jul 26, 2022 · 3 comments
Assignees

Comments

@murphyk
Copy link
Member

murphyk commented Jul 26, 2022

https://github.com/probml/pyprobml/blob/master/notebooks/book1/10/logreg_laplace_demo.ipynb

@willtryagain
Copy link
Contributor

can I work on this? I am not so familiar with tfp ( i am guessing that is bijax), but I have used TensorFlow and have done courses on Probability and Statistics.

@murphyk
Copy link
Member Author

murphyk commented Jan 27, 2023

Sure. You don't need to use tfp, and we don't even need bijax.
I suggest you code the laplace approximation from scratch, similar to https://github.com/probml/pyprobml/blob/master/notebooks/book1/04/laplace_approx_beta_binom_jax.ipynb
which is used to compute fig 7.3b in book2 (see below).
You just need to compute the MAP estimate using a optimizer (eg BFGS) then compute the Hessian, to get the posterior precision.

Screenshot 2023-01-26 at 5 37 46 PM

@willtryagain
Copy link
Contributor

Hey, I just wanted to inform I am still working on this. The code/math is not very easy to understand for me. However, as it is also not very long so I guess I can do it.

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

No branches or pull requests

3 participants