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

Simplify EKI update, correct dims error in nondeterministic settings #30

Merged
merged 1 commit into from
Jun 3, 2021

Conversation

ilopezgp
Copy link
Contributor

@ilopezgp ilopezgp commented May 23, 2021

This PR simplifies substantially the update of the EKI algorithm.

  • The computation of the cross-covariance matrices was done through a loop, which is unnecessary since we are already loading the Statistics module.
  • Everything was transposed for some reason. Now all data are stored in columns, similarly to the rest of the code.

The new construction produces the same results (tested with an assert before this PR). Note that I have not added the Bessel correction to the cross-covariances cov_ug and cov_gg to ensure consistency with the papers and the previous version. We can discuss this.

In addition, I have fixed an issue with the construction of y, which was Array{FT,1} for !deterministic_forward_map.

@ilopezgp ilopezgp requested review from mhowlan3 and odunbar May 23, 2021 01:16
@ilopezgp ilopezgp force-pushed the il/fix_eki_dims branch 2 times, most recently from 5f5da0f to 73eb53d Compare May 24, 2021 07:01
@odunbar
Copy link
Collaborator

odunbar commented Jun 2, 2021

LGTM! Thanks.

As for responses:

  1. i didn't realize that the cov(u,g,...) existed when first implementing this (i almost wouldn't be surprised if it didn't!)
  2. The transpose was there because initially there was a clash in different parts of the code then we unified everything, and the simplest fix at the time was to just permute things going into this function.
  3. With the y construction, i guess it wasn't an issue before because of broadcasting? either way this is fine with me

@ilopezgp
Copy link
Contributor Author

ilopezgp commented Jun 3, 2021

Yes, I think the cov functionality for cross-covariances might be a new implementation. And I agree that this was difficult to do when unifying all notation everywhere, which already required a lot of work.

@ilopezgp
Copy link
Contributor Author

ilopezgp commented Jun 3, 2021

bors r+

@bors
Copy link
Contributor

bors bot commented Jun 3, 2021

Build succeeded:

@bors bors bot merged commit bda158f into main Jun 3, 2021
@bors bors bot deleted the il/fix_eki_dims branch June 3, 2021 01:06
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.

2 participants