Skip to content

Commit d31a2dc

Browse files
authored
Documentation for: BarkerSampling(), AGPJL() and ObservationSeries (#392)
* new docs for observations, data-processing and sampling * add protocols section * sample * resolved typos etc. * add section for AGPJL * iteration typos * typos in agpjl * typos in data proc * added notes for encode/decode data and linearmaps. * typo * finish sentence * update sinusoid example * update lorenz example docs * update example for encoders * modify other docs for emulator examples * change case names * add new L63 results * format * new GFunction pictures * added quick links * broken link * add links * add new snippet
1 parent 2d80bc9 commit d31a2dc

44 files changed

Lines changed: 353 additions & 149 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,12 @@ Implements a derivative-free machine-learning-accelerated pipeline for uncertain
3636
[dlt-url]: https://juliapkgstats.com/pkg/CalibrateEmulateSample.c
3737

3838

39+
### Quick links
40+
41+
- [How do I build prior distributions?](https://clima.github.io/EnsembleKalmanProcesses.jl/dev/parameter_distributions/)
42+
- [How do I build good observational noise covariances](https://clima.github.io/EnsembleKalmanProcesses.jl/dev/observations/)
43+
- [What ensemble size should I take? Which process should I use? What is the recommended configuration?](https://clima.github.io/EnsembleKalmanProcesses.jl/dev/defaults/)
44+
- [Where can I walk through the simple example?](https://clima.github.io/CalibrateEmulateSample.jl/dev/examples/sinusoid_example/)
45+
- [What is the `EnsembleKalmanProcesses.jl` package?](https://clima.github.io/CalibrateEmulateSample.jl/dev/calibrate/)
46+
- [What are the recommendations/defaults for dimension reduction or data processing?](https://clima.github.io/CalibrateEmulateSample.jl/dev/data_processing/)
47+
- [How to I plot or interpret the posterior distribution?](https://clima.github.io/CalibrateEmulateSample.jl/dev/sample/)

docs/src/GaussianProcessEmulator.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,45 @@ gauss_proc = GaussianProcess(
103103
```
104104
You can also combine multiple ScikitLearn kernels via linear operations in the same way as above.
105105

106+
## [AGPJL](@id agpjl)
107+
108+
Autodifferentiable emulators are used by our differentiable samplers. Currently the only support for autodifferentiable Gaussian process emulators in Julia (within the `predict()` method, not hyperparameter optimization) is to use `AbstractGPs.jl`. As `AbstractGPs.jl` has no optimization routines for kernels, we instead apply the following (temporary) recipe:
109+
- Create and optimize a `GPJL` emulator and default kernel.
110+
```julia
111+
gp_jl = GaussianProcess(GPJL(); noise_learn=true, gpjl_kwargs...) # must! use default kernel
112+
em = Emulator(gp_jl, iopairs)
113+
optimize_hyperparameters!(em) # updates gp_jl
114+
```
115+
- Create the Kernel parameters as a vect-of-dict with
116+
```julia
117+
kernel_params = [
118+
Dict(
119+
"log_rbf_len" => model_params[1:end-2] # input-dim Vector,
120+
"log_std_sqexp" => model_params[end-1] # Float,
121+
"log_std_noise" => model_params[end],# Float,
122+
)
123+
for model_params in get_params(gp_jl)]
124+
```
125+
- Note: `get_params(gp_jl)` returns `output_dim`-vector where each entry is [a, b, c] with:
126+
- a is the `rbf_len`: lengthscale parameters for SEArd kernel [input_dim]- length Vector
127+
- b is the `log_std_sqexp` of the SQexp kernel Float
128+
- c is the `log_std_noise` of the noise kernel Float
129+
- Build a new gaussian process with `AGPJL`, use same keyword arguments as with `GPJL()` and add the kernel_params kwarg into the emulator
130+
```julia
131+
agp_jl = GaussianProcess(AGPJL(); noise_learn=true, gpjl_kwargs...)
132+
em = Emulator(agp_jl, iopairs; kernel_params=kernel_params)
133+
# no call to optimize_hyperparameters
134+
```
135+
136+
We would be keen to see contributions to our codebase to improve this interface (or to perform hyperparameter optimization with AGP directly).
137+
138+
!!! note "Other notes about the recipe"
139+
1. As stated, this only works for the default kernel option.
140+
2. If `noise_learn=false` then `log_std_noise` does not appear, the `model_params` indexing to the other hyperparameters should be adjusted
141+
2. For one-dimensional output, use `opt_params = Emulators.get_params(gauss_proc)[1]` to get the parameters
142+
143+
144+
106145
# Learning additional white noise
107146

108147
Often it is useful to learn the discrepancy between the Gaussian process prediction and the data, by learning additional white noise. Though one often knows, and provides, the discrepancy between the true model and data with an observational noise covariance; the additional white kernel can help account for approximation error from the selected Gaussian process kernel and the true model. This is added with the Boolean keyword `noise_learn` when initializing the Gaussian process. The default is true.
36.5 KB
Loading
45.2 KB
Loading
73.4 KB
Loading
175 KB
Loading

docs/src/assets/GP_l63_attr.png

-468 KB
Loading

docs/src/assets/GP_l63_cdfs.png

17.8 KB
Loading

docs/src/assets/GP_l63_pdf.png

-27.5 KB
Loading

docs/src/assets/GP_l63_test.png

49.3 KB
Loading

0 commit comments

Comments
 (0)