-
Notifications
You must be signed in to change notification settings - Fork 25
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
PriorExtractorContext #496
Conversation
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Pull Request Test Coverage Report for Build 5535103664
💛 - Coveralls |
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #496 +/- ##
==========================================
+ Coverage 76.40% 76.73% +0.32%
==========================================
Files 21 22 +1
Lines 2522 2549 +27
==========================================
+ Hits 1927 1956 +29
+ Misses 595 593 -2
☔ View full report in Codecov by Sentry. |
Hi @torfjelde & @devmotion! Do you have any suggestion on how to test the new context? Many thanks, |
I guess the natural thing would be to test it with different models (the set of test models?) and check that the extracted priors are correct. |
Co-authored-by: David Widmann <devmotion@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@@ -102,6 +102,12 @@ For a chain of samples, one can compute the pointwise log-likelihoods of each ob | |||
pointwise_loglikelihoods | |||
``` | |||
|
|||
Sometimes it can be useful to extract the priors of a model. This is the possible using [`extract_priors`](@ref). |
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.
If I understood this PR corrently, we are extracting the conditional priors of model parameters, i.e., priors conditioning on values of their parent nodes.
Sometimes it can be useful to extract the priors of a model. This is the possible using [`extract_priors`](@ref). | |
Sometimes it can be helpful to to extract the (conditional) priors of a model. This is possible using [`extract_priors`](@ref). |
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.
If I understood this PR corrently, we are extracting the conditional priors of model parameters, i.e., priors conditioning on values of their parent nodes.
Is this distinction necessary? For example, what is the difference between "the prior" and "the conditional prior" in x ~ Normal(); y ~ Normal(x, 1)
? I don't think I completely follow.
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.
My understanding is that we will not preserve the dependency structure of variables. In the example above, we will obtain prior_x=Normal(), prior_y=Normal(value_x, 1)
, where value_x = rand(Normal())
. So the dependency information of y
on x
is lost.
This reverts commit cab9f9c.
This issue with the docs is very strange. Basically, the doctests pass just fine when run in Have you come across this before @devmotion ? |
Okay so "fixed" the issue by adding also EDIT: "weird" in the sense that I haven't before realized whether the qualifier is included or not, despite where the |
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Implements the tool to extract the priors from a model proposed by @torfjelde in #2009. Previously in #2031.