Skip to content
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

Add GaussianRandomFields to ParameterDistributions #252

Merged
merged 1 commit into from
Apr 19, 2023
Merged

Add GaussianRandomFields to ParameterDistributions #252

merged 1 commit into from
Apr 19, 2023

Conversation

odunbar
Copy link
Collaborator

@odunbar odunbar commented Feb 15, 2023

Purpose

Content

  • Currently allows: ND -> 1D functions with zero-mean allowed, stored flat.
  • hierarchy: GaussianRandomField <: FunctionParameterDistributionType <: ParameterDistributionType
  • We use the package GaussianRandomFields.jl as the back-end
  • We provide a default for the prior coefficients distribution under-the-hood, when given a GRF. Otherwise we allow a user-defined coefficient parameter distribution
  • When built as a ParameterDistribution, the user provides a single constraint and this constraint is applied to all discretization points when the function is constructed and constrained.
  • Compatible with the transform mappings: for parameter distributions. E.g the default is now, given coefficients vector x in unconstrained space. u->c will transform the unconstrained to constrained coefficients, then builds the unconstrained function, then constrains this function
  • Docstrings
  • Darcy Flow Example in example/Darcy Note: We generate truth and solve problem with efunction expansion.

Plots from Tests

1D Samples of the default prior distribution based on GRF(Matern(smooth. 1.0,corr. len. 0.1))
GRF_samples

A 2D sample with bounded(-5,-3) constraint
GRF_samples_constrained
The unconstrained 2D sample
GRF_samples_unconstrained

Results from Darcy Flow:

Prior Mean
output_it_0
Final Ensemble Mean
output_it_10
Truth
output_true


  • I have read and checked the items on the review checklist.

@odunbar odunbar force-pushed the orad/GRF branch 6 times, most recently from 9e6fca4 to 457d2ab Compare March 20, 2023 18:44
@odunbar odunbar changed the title [WIP] Add GaussianRandomFields to ParameterDistributions Add GaussianRandomFields to ParameterDistributions Mar 20, 2023
@odunbar odunbar force-pushed the orad/GRF branch 2 times, most recently from e56efa1 to 77d1119 Compare March 20, 2023 20:42
Copy link
Contributor

@Zhengyu-Huang Zhengyu-Huang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The results are amazing! Thanks for the great work!

Project.toml

format

add plot to tests

fix global_rng consistency

improved interface and seperated coeff vs function sampling

constrained sampling from distribution and testing

sample from prior test

changed transforms to be more consistent and compatible with func dists

removed dimensional ambiguities in ndims for functions and tested c->u and u->c

get_logpdf -> logpdf

2D examples, unit tests done

docstrings

codecov

docstrings

format

docstring?

docstrings

Darcy example

removed additional sampling in KL

adjusted tests for user dist, and new func construction

removed unnecessary functions

plot bugfix

fixed bug runtest

removed rng from build without coeffs, more robust tests

rm rng

codecov

re-open all tests
@odunbar
Copy link
Collaborator Author

odunbar commented Apr 19, 2023

bors r+

@bors
Copy link
Contributor

bors bot commented Apr 19, 2023

Build succeeded:

@bors bors bot merged commit aed4e99 into main Apr 19, 2023
@bors bors bot deleted the orad/GRF branch April 19, 2023 00:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants