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

[MED]: PDE Example Refactor #32

Open
5 of 14 tasks
mathematicalmichael opened this issue Mar 12, 2021 · 3 comments
Open
5 of 14 tasks

[MED]: PDE Example Refactor #32

mathematicalmichael opened this issue Mar 12, 2021 · 3 comments

Comments

@mathematicalmichael
Copy link
Owner

mathematicalmichael commented Mar 12, 2021

Feature Request

  • should be able to specify a distribution independent of a set of samples used for loading
  • three datasets should be packaged in 2D: uniform, normal with 95% of samples in (0,4), normal with 99% of samples in (0,4)
  • in 1D, same idea.
  • in 5D, just uniform
  • 1000 samples for each, 100 500 sensors maximum
  • stop inferring distribution from filename
  • get rid of prefix handling
  • be able to create MUD-1D (not just MUD-2D-alt).

Must do:

  • default to log likelihoods in mud, don't compute the evidence for the posterior. It causes divide by zero errors.

Nice to haves:

  • decouple runner from pde example, make it entirely independent
  • pde 1D probably can be separated out since it has a different set of figures
  • can we attach the geometry study to the output as well?
  • check out contents of results.pkl and decide if it's worth keeping
  • refactor the experiment-handling methods to be more transparent in what they are doing. Use dictionaries as configs?
@mathematicalmichael
Copy link
Owner Author

mathematicalmichael commented Mar 12, 2021

Other bugfixes:

  • matplotlib fontsize in comparison figures
  • rename files to have descriptive names inv -> monomial
  • either make a submodule for the linear examples, or separate the contour one out.
  • maybe linear.dimension / linear.rank / linear.contours
  • nonlinear.pde / nonlinear.ode / nonlinear.monomial
  • rand.py should be renamed somehow. random_maps or maybe linear.models is more apt?

@mathematicalmichael
Copy link
Owner Author

mathematicalmichael commented Mar 12, 2021

@eecsu usage examples:

mud_run_pde -d n --loc 0 --scale 1 -m 20 100 500  # unassuming prior
mud_run_pde -d n --loc -2 --scale 0.2 -m 20 100 500  # very nice comparison
mud_run_pde -d n --loc -2 --scale 0.1 -m 20 100 500  # too restrictive

I made extensive use of kwargs to support arbitrary distributions (so, this should work beyond just scipy in theory as long as methods .pdf exist).

if loc/scale not provided as kwargs, then we default to -2, 0.2 in Normal, -4, 4 in Uniform.

code not refactored yet, but the feature is working, and results can be put in front of Troy for review. Warrants a release candidate.

prefix handling is gone, prefix=results hard-coded into make_reproducible_without_fenics, shell scripts not updated.

still infer distribution from file name in order to pass sample_dist as an argument (if u (uniform), then use weighted KDE always... since if the prior/initial is uniform, it's fine, and if normal, beta, etc, then it's using the right tranformation with the weights set as the initial pdf evaluations).

@mathematicalmichael
Copy link
Owner Author

also made some headway on moving functions around / modules. tests passing, see #33

@mathematicalmichael mathematicalmichael changed the title [HIGH]: Decouple samples from prior/initial density [MED]: PDE Example Refactor Mar 28, 2021
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

No branches or pull requests

1 participant