new predict method API, and reduced sampling in input space#404
Merged
new predict method API, and reduced sampling in input space#404
Conversation
42f37c7 to
105d172
Compare
Co-authored-by: ArneBouillon <45404227+ArneBouillon@users.noreply.github.com>
deprecate transform_to_real replace transform_to_real kwarg, and add add_obs_noise_cov
105d172 to
b02758f
Compare
…terior currently)
…gaussian lifts correctly
…teps during tests
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #404 +/- ##
==========================================
+ Coverage 94.20% 94.23% +0.02%
==========================================
Files 10 10
Lines 1813 1977 +164
==========================================
+ Hits 1708 1863 +155
- Misses 105 114 +9 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Comment on lines
+518
to
+521
| if add_obs_noise_cov | ||
| for i in 1:size(σ2, 2) | ||
| σ2[:, i] .= σ2[:, i] + gp.regularization | ||
| end |
Collaborator
There was a problem hiding this comment.
It might be difficult to change, but it seems like a bit of a contrast to me to use the very explicit add_obs_noise_cov and, on the other hand, use the vague gp.regularization to contain this noise cov.
Member
Author
|
Update:
|
ArneBouillon
reviewed
Apr 2, 2026
ArneBouillon
approved these changes
Apr 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Co-authored by @ArneBouillon
Purpose
Content
predict()for bothEmulatorandForwardMapWrappertransform_to_real=falsekwarg. Removed this from all tests (except to test the deprecation message)add_obs_noise_cov=falsekwarg to predict. when set true, this adds the regularization to the machine learning toolencode=nothingto the predict method, when set to"in", "out", "in_and_out"it will take in / push out encoded/decoded outputs.ForwardMapWrapper, samples are decoded into the output space before applicationAPI is now improved for user experience
NoiseInjectorand then usedecode_and_add_noise(noise_injector, samples)to apply the decoding. Users can also setnoise_injector_threshold(to determine how lossy before injection)noise_injector_scaling(in case the injection results in instability due to Gaussian assumptions)get_encoder_from_scheduleto returnE,bfrom anencoder_scheduledefining an affine encodingEx + bMisc
Sinusoidexample, [now testing on Darcy...]_predict,,->;transform_to_realfrom documentation #411Detail on current encoding setup
Current settings: full (F) vs reduced (R) space
Darcy example - [updated since review]
We compare, lossless encoding. Lossy encoding without inflation, Lossy encoding (retain 99.5%var) with inflation, and the truth. We look for the lossy encoding to by increased by using the prior variance. The D utility indicates the amount of contraction from prior to posterior (by comparison of determinants)
Lossless- (20D->50D), D utility O(10^11)Lossy - inflate- (19D->15D), D utility O(10^11)Lossy - no inflate- (19D->15D), D utility O(10^29)trueSinusoid example
Encoding truncates to ignore one of the (independent) parameters. So null space of the encoder means one samples the prior. Here we compare inflation with scaling 1, 0.2, and no inflation.

With inflation (GP, RF, ForwardMap)With inflation scaled by 0.2 (GP, RF, ForwardMap)Without inflation (GP, RF, ForwardMap)