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

Unify the handling of different types of Ensemble Kalman methods #18

Open
5 tasks
bielim opened this issue Apr 4, 2021 · 1 comment
Open
5 tasks

Unify the handling of different types of Ensemble Kalman methods #18

bielim opened this issue Apr 4, 2021 · 1 comment
Assignees

Comments

@bielim
Copy link
Contributor

bielim commented Apr 4, 2021

EnsembleKalmanProcesses.jl currently contains three Ensemble Kalman methods: Ensemble Kalman Inversion (EKI), Ensemble Kalman Sampling (EKS), and Unscented Kalman Inversion (UKI). Ideally, these three methods can be used through a common interface, which highlights their conceptual similarities while abstracting away their differences to the extent possible.

Goal:
The general idea is that an EnsembleKalmanProcess should be constructed from the observational mean, the covariance of the observational noise, and a Process struct (Inversion, Sampler, or Unscented), which contains the additional information that is needed for the particular process type. The construction of an EnsembleKalmanProcess should also include the generation of the initial ensemble of particles.

The signature of all EnsembleKalmanProcess outer constructors should thus look as follows:
EnsembleKalmanProcess(obs_mean::Array{Float64, 1}, obs_cov::Array{Float64, 2}, process::Process)

Current status:
At the moment, there are two EnsembleKalmanProcess outer constructors: a constructor for Inversion and Sampler processes, and a constructor for Unscented processes. In EKI and EKS, the ensemble of initial particles is generated prior to the construction of an EnsembleKalmanProcess, and the initial ensemble is then passed as an argument to the constructor, whereas in UKI the initial ensemble is generated as part of the construction. Both constructors take a time step argument \Delta t, which actually remains unused in UKI (see issue #16).

To do:
The unified interface outlined above requires the following changes:

  • Move the construction of the initial ensemble (done by construct_initial_ensemble) into the EnsembleKalmanProcess constructor for EKI and EKS

  • construct_initial_ensemble takes the prior (a ParameterDistribution object) and the desired ensemble size N_ens as inputs, so these two pieces of information have to be added to the Inversion and Sampler structs.

  • The prior mean and covariance currently stored in the Sampler struct can be removed, as this information can be derived from the prior distribution

  • Remove the time step \Delta t from the EnsembleKalmanProcess constructors and add it to the Inversion and Sampler structs instead (the Unscented struct doesn't need a \Delta t)

  • A nice additional feature to have would be a function get_solution(ekp::EnsembleKalmanProcess), which returns the solution of the particular Ensemble Kalman process (e.g., the mean of the final iteration for EKI, or the mean and covariance for EKS).

@odunbar odunbar self-assigned this Apr 5, 2021
@odunbar
Copy link
Collaborator

odunbar commented Apr 5, 2021

I agree with these points.

Perhaps a good way to think about these changes, is let's say we have a new method called Unperfumed. What must we create for such an object to be used in the tool:

  • the Unperfumed process, dependent on the Prior and other algorithmic parameters
  • the method construct_initial_ensemble(process::Unperfumed)
  • the method update_ensemble(EnsembleKalmanProcess{...,Unperfumed}, ...)
  • the method get_solution(EnsembleKalmanProcess{...,Unperfumed})

As you say, currently we don't have a process dependent initial ensemble creation, nor a process dependent way of obtaining the solution.These Kalman methods will always return a mean and covariance, it may be worth always returning both so long as in the docs we state clearly that the EKI covariance does not have a statistical meaning (though people still may wish to obtain 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

2 participants