CliMA / EnsembleKalmanProcesses.jl

Implements Optimization and approximate uncertainty quantification algorithms, Ensemble Kalman Inversion, and Ensemble Kalman Processes.
https://clima.github.io/EnsembleKalmanProcesses.jl/dev
Apache License 2.0
80 stars 18 forks source link

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

Open bielim opened 3 years ago

bielim commented 3 years ago

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:

odunbar commented 3 years ago

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:

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) .