-
Notifications
You must be signed in to change notification settings - Fork 17
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
[WIP] Update examples to work with latest CES code #92
Conversation
Codecov Report
@@ Coverage Diff @@
## master #92 +/- ##
=======================================
Coverage 85.19% 85.19%
=======================================
Files 7 7
Lines 547 547
=======================================
Hits 466 466
Misses 81 81
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! I think the heart of my comments are that we have built an interface with ParameterDistribution
s, and so we should use always use it. That is, rather than directly accessing the (effectively private) members e.g posterior.distribution[i]
we should be instead "getting" them. i.e call get_distribution(posterior)
and then using the returned objects. This is typically easier to maintain down the line if everything interacts with the distributions in the same way. If the right getter functionality isn't there we should add the getter functions over bypassing them.
Use getters (Ollie's comments), additional explanations, beautification, etc.
Superseded by #94 (messed up the squash and rebase :-)) |
The goal of this PR is to get all examples synced up with the latest changes in the code base (in particular, PRs #88 and #89)
Cloudy_example.jl
learn_noise.jl
plot_GP.jl
In addition,
get_distribution()
(inParameterDistribution.jl
) has been modified to return the array of samples when called forSamples
( rather than the message "Contains samples only").get_distribution
now returns aDict
with the parameter names as keys and the corresponding distribution (in the case ofParameterized
distributions, such as Normal(0.0, 1.0)) or the corresponding samples (in the case of parameters represented bySamples
) as a parameter_dimension x n_samples array.