-
Notifications
You must be signed in to change notification settings - Fork 17
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
Sinusoidal example #287
Sinusoidal example #287
Conversation
…usoidal example. This example is 2d->2d for a model of a sinusoid that depends on 2 parameters (amplitude, vertical shift) and given a system where we make noisy observations of its range and mean position. New files in example: * Setup script (functions defined for the true model) * Calibrate (using ensemble kalman inversion) * Emulate (using GP, RF and emulator validation plots) * Sample (with mcmc and plotting 2d posteriors). New docs under page Simple example walkthrough: a walkthrough of these scripts with plots for each step.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #287 +/- ##
==========================================
+ Coverage 88.09% 88.26% +0.16%
==========================================
Files 7 8 +1
Lines 1134 1184 +50
==========================================
+ Hits 999 1045 +46
- Misses 135 139 +4 ☔ View full report in Codecov by Sentry. |
… in src/examples/Sinusoid/, so now the docs page can be run and is reproducible. This also changed a few numbers slightly that were initially run through the examples pages rather than the docs pages. * `rng` is now saved into `.jld2` files at the end of the example scripts and then opened at the start of the next script, so entire workflow agrees with results of running snippets from the docs pages. * I increased the nugget term from 1e-12 to 1e-9 to help stability and consistency. * Added missing imports Statistics and Distributions in docs and in example file. * `emulator` -> `emulator_gp` in docs page * defined `init_sample` and other variables that go into the random features emulator in docs page.
cfc4045
to
d91eece
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you remove the rng
stuff in the documentation page. It's nice to have it in the examples/Sinusoid
files for reproducibility, but I personally think it just adds mess to the docs explanation.
Once this is done, LGTM!
Althought the PR seems to be logging a lot of changes on main as coming from this PR - perhaps that will update when the PR is no longer a draft...
This will close issue #283 on reproducibility of sinusoid example
Content
rng
saved and re-opened between each script (calibrate.jl
,emulate.jl
,sample.jl
) so that running the example scripts gives same results as running the tutorial. This changed some of the plots and numbers.Statistics
andDistributions
addedinit_sample
,input_dim
, ...) and typoemulator
->emulator_gp
.See preview here