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

Suggestions for pointwise_logdensities and siblings #669

Closed
wants to merge 14 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions docs/src/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,17 @@ For a chain of samples, one can compute the pointwise log-likelihoods of each ob
pointwise_loglikelihoods
```

Similarly, one can compute the pointwise log-priors of each sampled random variable
with [`varwise_logpriors`](@ref).
Differently from `pointwise_loglikelihoods` it reports only a
single value for `.~` assignements.
Copy link
Contributor

Choose a reason for hiding this comment

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

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
single value for `.~` assignements.
single value for `.~` assignements.

If one needs to access the parts for single indices, one can
reformulate the model to use an explicit loop instead.

```@docs
varwise_logpriors
```

For converting a chain into a format that can more easily be fed into a `Model` again, for example using `condition`, you can use [`value_iterator_from_chain`](@ref).

```@docs
Expand Down
3 changes: 2 additions & 1 deletion src/DynamicPPL.jl
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ export AbstractVarInfo,
logprior,
logjoint,
pointwise_loglikelihoods,
pointwise_logdensities,
condition,
decondition,
fix,
Expand Down Expand Up @@ -181,7 +182,7 @@ include("varinfo.jl")
include("simple_varinfo.jl")
include("context_implementations.jl")
include("compiler.jl")
include("loglikelihoods.jl")
include("pointwise_logdensities.jl")
include("submodel_macro.jl")
include("test_utils.jl")
include("transforming.jl")
Expand Down
257 changes: 0 additions & 257 deletions src/loglikelihoods.jl

This file was deleted.

Loading
Loading