You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Standardize the README to match the structure/style/badges used across
other CliMA repos (logo, badge table, Features, Quick Example), and
update the LICENSE/NOTICE copyright line to reflect the repo's actual
first-commit year (2019-2026), California Institute of Technology
(Climate Modeling Alliance).
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01T3GJ3g8X3sQuPCnGcrwfTy
`CalibrateEmulateSample.jl` solves parameter estimation problems using accelerated (and approximate) Bayesian inversion. Given an observation `y`, a computer model (forward map) `G`, observational noise covariance `Γ`, and broad prior information on the parameters `θ`, it returns the joint data-informed distribution of "`θ` given `y`" for `y = G(θ) + η`, `η ~ N(0, Γ)`. The framework is not inherently restricted to unimodal distributions and can be applied to computer models that are noisy or chaotic, non-differentiable, or that can only be treated as a black box (interfaced only through parameter files). As the name suggests, the package breaks the problem into three stages — calibration (via [EnsembleKalmanProcesses.jl](https://github.com/CliMA/EnsembleKalmanProcesses.jl)), emulation of the forward map, and sampling of the emulated posterior — following the approach described in [Cleary et al. (2020)](https://arxiv.org/pdf/2001.03689.pdf).
52
+
53
+
## Quick Links
40
54
41
55
-[I'm getting errors about the python dependency](https://clima.github.io/CalibrateEmulateSample.jl/dev/installation_instructions/)
42
56
-[How do I build prior distributions?](https://clima.github.io/EnsembleKalmanProcesses.jl/dev/parameter_distributions/)
@@ -45,15 +59,25 @@ Implements a derivative-free machine-learning-accelerated pipeline for uncertain
45
59
-[Where can I walk through the simple example?](https://clima.github.io/CalibrateEmulateSample.jl/dev/examples/sinusoid_example/)
46
60
-[What is the `EnsembleKalmanProcesses.jl` package?](https://clima.github.io/CalibrateEmulateSample.jl/dev/calibrate/)
47
61
-[What are the recommendations/defaults for dimension reduction or data processing?](https://clima.github.io/CalibrateEmulateSample.jl/dev/data_processing/)
48
-
-[How to I plot or interpret the posterior distribution?](https://clima.github.io/CalibrateEmulateSample.jl/dev/sample/)
62
+
-[How do I plot or interpret the posterior distribution?](https://clima.github.io/CalibrateEmulateSample.jl/dev/sample/)
63
+
64
+
## Features
65
+
66
+
-**Derivative-free Bayesian inversion**: learns the joint distribution over parameters `θ` given noisy observations `y = G(θ) + η`, without requiring gradients of the forward model `G`.
67
+
-**Works with black-box forward models**: compatible with computer models that are noisy, chaotic, non-differentiable, or only interfaced through parameter files.
68
+
-**Three-stage pipeline**: *Calibrate* with [EnsembleKalmanProcesses.jl](https://github.com/CliMA/EnsembleKalmanProcesses.jl), *Emulate* the forward map with a Gaussian Process or Random Feature interface, and *Sample* the emulated posterior with Markov chain Monte Carlo.
69
+
-**Flexible emulators**: Gaussian Process and Random Feature emulator interfaces, with configurable kernel structures and input/output data encoding and decorrelation schedules.
70
+
-**Dimension reduction and data processing**: recommended defaults for encoding, decorrelating, and reducing high-dimensional input-output pairs before emulation.
71
+
-**Not restricted to unimodal posteriors**: supports flexible numbers of parameters and multimodal joint distributions.
49
72
73
+
## Quick Example
50
74
51
-
# What does it look like to use?
52
-
Having installed CES and Plots, you can copy-paste the snippets below to recreate this random experiment (up to random number generation).
75
+
Having installed CES and Plots, you can copy-paste the snippets below to recreate this random experiment (up to random number generation).
53
76
54
77
### Calibrate
78
+
55
79
Below we will outline the current user experience for using `EnsembleKalmanProcesses.jl`.
56
-
We solve the classic inverse problem where we learn `y = G(u)`, noisy forward map `G` distributed as `N(0,Γ)`. For example,
80
+
We solve the classic inverse problem where we learn `y = G(u)`, noisy forward map `G` distributed as `N(0,Γ)`. For example,
57
81
```julia
58
82
59
83
using LinearAlgebra
@@ -79,7 +103,7 @@ using CalibrateEmulateSample.EnsembleKalmanProcesses.ParameterDistributions
We now hvae a quick and cheap estimate of the mode of the distribution here, but no quantified uncertainty. To postprocess in a way that gives us back uncertainty, we will emulate `G` using our current EKP evaluations, and apply a proper sampling algorithm to the emulator. No more evaluations of `G` are required!
136
+
We now have a quick and cheap estimate of the mode of the distribution here, but no quantified uncertainty. To postprocess in a way that gives us back uncertainty, we will emulate `G` using our current EKP evaluations, and apply a proper sampling algorithm to the emulator. No more evaluations of `G` are required!
We then set up the emulation framework, by getting input-output pairs from the EKP, defining which emulator to use, and defining what space we will train our emulator in. Here, we take a Random Feature emulator, and we decorrelate the training space, using prior (input) and noise (output) covariances. *This stage can take several minutes.*
Having created a suitable emulator, we can pass everything into the sampler, here a random walk metropolis algorithm (MCMC). We find a suitable step size and then draw 100,000 samples from the emulator-based posterior.
207
229
```julia
@@ -227,9 +249,8 @@ end
227
249
display(ppp)
228
250
```
229
251
230
-
We see that the approximate posterior contains both EKI and the true parameter, and that the the parameter `four_with_spread_5(dim 4)` is highly constrained, while `four_with_spread_5(dims 1)` and `(dim 4)` are least constrained by the observations, coinciding with the EKI performance. More detail on correlation structure can be extracted by pair-plotting, and posterior analysis.
252
+
We see that the approximate posterior contains both EKI and the true parameter, and that the parameter `four_with_spread_5(dim 4)` is highly constrained, while `four_with_spread_5(dims 1)` and `(dim 4)` are least constrained by the observations, coinciding with the EKI performance. More detail on correlation structure can be extracted by pair-plotting, and posterior analysis.
More runnable examples (Sinusoid, Lorenz, Cloudy, Darcy, EDMF, GCM, and dimension-reduction configurations) are in the [`examples/`](examples/) directory.
0 commit comments