Template example
We provide the following template for how the tools may be applied.
For small examples typically have 2 files.
DynamicalModel.jl
Contains the dynamical model $\Psi$ and the observation map $\mathcal{H}$. The inputs should be the so-called free parameters (in the constrained/physical space that is the input domain of the dynamical model) we are interested in learning, and the output should be the measured data.- The example script which contains the inverse problem setup and solve
The structure of the example script
Create the data and the setting for the model
- Set up the forward model.
- Construct/load the truth data.
Set up the inverse problem
- Define the prior distributions, and generate an initial ensemble.
- Initialize the
process
tool you would like to use (we recommend you begin withInversion()
). - initialize the
EnsembleKalmanProcess
object
Solve the inverse problem, in a loop
- Obtain the current parameter ensemble
- Transform them from the unbounded computational space to the physical space
- call the forward model on the ensemble of parameters, producing an ensemble of measured data
- call the
update_ensemble!
function to generate a new parameter ensemble based on the new data
Get the solution
- Obtain the final parameter ensemble, compute desired statistics here.
- Transform the final ensemble into the physical space for use in prediction studies with the forward model.