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

EKF (diagonal) #9

Merged
merged 11 commits into from
Feb 1, 2024
Merged

EKF (diagonal) #9

merged 11 commits into from
Feb 1, 2024

Conversation

SamDuffield
Copy link
Contributor

Adds extended Kalman filter (EKF) implementations with diagonal Hessian and empirical Fisher approximations to the Hessian of the likelihood.

It's perhaps a non-standard version of the EKF which uses the gradient and Hessian approximation of the likelihood at time t rather than the Jacobian of the non-linear conditional mean of the likelihood. This version is easier to implement since it only requires the log_likelihood function itself (and its gradients) rather than the conditional mean of the likelihood function. For more details see https://arxiv.org/abs/1703.00209 which also gives a gradient descent interpretation and an equivalence between likelihood inverse temperature and learning rate (which we adopt).

Additionally this PR adds a flexi_tree_map function to simplify the inplace code.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we shouldn't include files like these in this PR. They seem unrelated to the PR. We should open a second PR for this, like "update sghmc with new library"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah this was lazy from me, the flexi_tree_map update should have been its own PR

Copy link

@dmitrisaberi dmitrisaberi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link
Contributor

@johnathanchiu johnathanchiu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like what you did with the flexi_tree_map. Cleans up the code nicely.

I'll trust @dmitrisaberi's review on the EKF stuff. I still need to read through the paper more closely to understand the methods.

@SamDuffield SamDuffield merged commit 2784e73 into main Feb 1, 2024
2 checks passed
@SamDuffield SamDuffield deleted the ekf branch February 1, 2024 10:23
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.

3 participants