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

modified EKI/EKS runtest #73

Merged
merged 8 commits into from
Dec 9, 2021
Merged

modified EKI/EKS runtest #73

merged 8 commits into from
Dec 9, 2021

Conversation

odunbar
Copy link
Collaborator

@odunbar odunbar commented Nov 19, 2021

Purpose

To get the EKI runtest properly working with a linear map from R^{2} -> R^{10}. (i) some reason a couple of the @test statements were commented out (ii) the tests comparing EKS and EKI are very dependent on N_iter

In the PR

Changes to the EKI test in test/EnsembleKalmanInversion/runtests.jl So that it now converges reasonably and satisfies all the test conditions.

NB some of the comparisons of eks/eki depended heavily on N_iter. To compare the two algorithms we should really look at the timesteps in absolute time. So now

  1. I have increased the prior strength and bias
  2. I run EKS first with it's adaptive timestep, which I store in eksobj
  3. then use these values in the EKI updates.

The OLS mean is nearer the EKI at the end time, and the posterior mean is nearer the EKS at the end time, far more robustly than previously.

Test output plot

For EKI
EKI_test

For EKS
EKS_test

@odunbar
Copy link
Collaborator Author

odunbar commented Dec 2, 2021

@agarbuno @jinlong83 could I get some reviews on this please

Copy link
Contributor

@navidcy navidcy left a comment

Choose a reason for hiding this comment

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

I made few suggestions for plotting style

@odunbar
Copy link
Collaborator Author

odunbar commented Dec 8, 2021

Thanks Navid! See new plots

@agarbuno
Copy link
Contributor

agarbuno commented Dec 9, 2021

I guess we can't really compare the two algorithms at a specific simulated time T. The thing is both EKI and EKS have very different long time dynamics.

  1. We know EKS stabilizes at some time (there are some theoretical results on it stabilizing in an attractor set of Gaussians) and it stays there which in the long run is the approximate posterior.
  2. We know EKI in the long run collapses to the solution of the Least Square problem.

So if N_iter is sufficiently large then:

  1. EKI should collapse to the solution of the OLS in this case.
  2. EKS should be on top of the posterior.

Maybe try with a sufficiently large number of ensemble updates? Since this is a linear and Gaussian setting it shouldn't take so long and from the figures I guess it has been sufficient for both methods to stabilize in their respective long-time behavior.

I believe we should proceed to merge this.

@odunbar
Copy link
Collaborator Author

odunbar commented Dec 9, 2021

Thanks!

In the previous implementation, different realizations, steps and ensemble sizes caused tests to fail. I think that this test gives more separation between the OLS and posterior mean. and more reliable results.

We can discuss offline about the algorithmic time implication of how comparable the progression of the algorithms are.

@odunbar
Copy link
Collaborator Author

odunbar commented Dec 9, 2021

bors r+

@bors
Copy link
Contributor

bors bot commented Dec 9, 2021

Build succeeded:

@bors bors bot merged commit 6af05b6 into main Dec 9, 2021
@bors bors bot deleted the orad/eki_test branch December 9, 2021 19:14
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