mathematicalmichael / mud-examples

Creation of figures for papers pertaining to the MUD (Maximal Updated Density) method for Parameter Estimation.
https://mud-examples.readthedocs.io/
MIT License
0 stars 1 forks source link

[MED]: PDE Example Refactor #32

Open mathematicalmichael opened 3 years ago

mathematicalmichael commented 3 years ago

Feature Request

Must do:

Nice to haves:

mathematicalmichael commented 3 years ago

Other bugfixes:

mathematicalmichael commented 3 years ago

@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 commented 3 years ago

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