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

ParameterDistributions.jl improvements #196

Merged
merged 1 commit into from
Aug 30, 2022
Merged

Conversation

odunbar
Copy link
Collaborator

@odunbar odunbar commented Aug 26, 2022

Purpose

Fixes #184 and #192, also small update to remove warning in DataContainers/ParameterDistributions test. This works towards a better interface for ParameterDistributions.

Content

  • Extending constrained_gaussian to multidimensional distirbutions by adding a repeats=N keyword with N=1 default.
  • Adds Types constraints into NoConstraint BoundedBelow BoundedAbove and Bounded
  • Adds "parameters" to constraints, containing a Dict (or nothing). allows extraction of values of interest. for example
    x = bounded_below(3.0) stores x.parameters = Dict("lower_bound" => 3.0)
  • extending == to Constraints (based on the above parameters and Types, as constraints are functions so hard to equate)
  • extending == to ParameterDistributions for easier testing calls
  • Miscellaneous: Removed the MvNormal(int,real) calls that are now deprecated, replacing with MvN(zeros(int), real*I)

@odunbar odunbar requested review from tsj5 and ilopezgp August 26, 2022 17:42
@odunbar odunbar changed the title Orad/param dist improvements ParameterDistributions.jl improvements Aug 26, 2022
@odunbar odunbar force-pushed the orad/param-dist-improvements branch from 1d6d426 to c7e329e Compare August 26, 2022 17:47
src/ParameterDistributions.jl Outdated Show resolved Hide resolved
src/ParameterDistributions.jl Outdated Show resolved Hide resolved
@odunbar odunbar force-pushed the orad/param-dist-improvements branch 3 times, most recently from 41388b8 to 96483ac Compare August 30, 2022 11:54
…ethod, with unit tests

tests all now pass

misc update to DataContainers test

clima format

removed MvNormal deprecated calls

new climaformatter

codecov

parameters->bounds and API for Constraint

docs API

format

rebase typo

format
@odunbar odunbar force-pushed the orad/param-dist-improvements branch from 9e6420c to 36f8057 Compare August 30, 2022 12:06
Copy link
Contributor

@ilopezgp ilopezgp left a comment

Choose a reason for hiding this comment

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

LGTM

@odunbar
Copy link
Collaborator Author

odunbar commented Aug 30, 2022

bors r+

@bors
Copy link
Contributor

bors bot commented Aug 30, 2022

Build succeeded:

@bors bors bot merged commit c3c9f1f into main Aug 30, 2022
@bors bors bot deleted the orad/param-dist-improvements branch August 30, 2022 15:59
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.

Overloading == for ParameterDistributions
2 participants