Add GaussianRandomFields to ParameterDistributions #252
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.
Purpose
This PR will enable users to learn parameters that are discretizations of functions.
Content
GaussianRandomField <: FunctionParameterDistributionType <: ParameterDistributionType
GaussianRandomFields.jl
as the back-endParameterDistribution
, the user provides a single constraint and this constraint is applied to all discretization points when the function is constructed and constrained.x
in unconstrained space.u->c
will transform the unconstrained to constrained coefficients, then builds the unconstrained function, then constrains this functionexample/Darcy
Note: We generate truth and solve problem with efunction expansion.Plots from Tests
1D Samples of the default prior distribution based on
![GRF_samples](https://user-images.githubusercontent.com/47412152/226429501-7c747e3a-3a99-431e-9e5b-25883913dda7.png)
GRF(Matern(smooth. 1.0,corr. len. 0.1))
A 2D sample with
![GRF_samples_constrained](https://user-images.githubusercontent.com/47412152/225775099-a2368aba-061c-492b-bcd9-25545607a3b0.png)
![GRF_samples_unconstrained](https://user-images.githubusercontent.com/47412152/225775102-76411524-3b49-4e2b-bdcd-3d31c2e0481d.png)
bounded(-5,-3)
constraintThe unconstrained 2D sample
Results from Darcy Flow:
Prior Mean
![output_it_0](https://user-images.githubusercontent.com/47412152/226073056-1e356aee-06df-42e7-bec1-6c3a77febb3e.png)
![output_it_10](https://user-images.githubusercontent.com/47412152/226073057-9b7cf60f-43f6-4701-b41a-550ecdb7bce7.png)
![output_true](https://user-images.githubusercontent.com/47412152/226073058-721ccbe1-83ec-4a61-a0f2-bb8c48c108ca.png)
Final Ensemble Mean
Truth