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 conditional mean and cov #39

Merged
merged 3 commits into from
Sep 24, 2024
Merged

Add conditional mean and cov #39

merged 3 commits into from
Sep 24, 2024

Conversation

SamDuffield
Copy link
Contributor

Adds convenience functions to grab the analytical solution to the Fokker-Planck equation for OU processes

@SamDuffield SamDuffield added the enhancement New feature or request label Sep 23, 2024
@SamDuffield SamDuffield self-assigned this Sep 23, 2024
@SamDuffield
Copy link
Contributor Author

The log_prob MLE test was failing on the CI (not exactly sure why), I took the chance to generalise to learning an asymmetric A and now it seems to pass. We should still think about how to speed this up though #32

Copy link
Contributor

@KaelanDt KaelanDt left a comment

Choose a reason for hiding this comment

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

Looks good to me, but am a bit unclear on what the added code is/will be used for

b: Array,
D: Array | ProcessedDiffusionMatrix,
) -> Array:
"""Mean of p(x_t | x_0)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
"""Mean of p(x_t | x_0)
"""Computes the mean of p(x_t | x_0)

Copy link
Contributor

Choose a reason for hiding this comment

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

same applies in other places

@SamDuffield
Copy link
Contributor Author

Looks good to me, but am a bit unclear on what the added code is/will be used for

I think these functions are useful to have and could find a variety of applications. Two concrete ones:

  • If you want to compute e.g. KL or Wasserstein from another Gaussian distribution.
  • Used as the dynamics of a Kalman filter and composition with Kalman prediction + update procedures.

@SamDuffield SamDuffield merged commit ea286e6 into main Sep 24, 2024
2 checks passed
@SamDuffield SamDuffield deleted the mean-cov branch September 24, 2024 09:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants