Skip to content

Commit 9402c11

Browse files
authored
Reexport other pointwise density functions (#2812)
Although arguably `pointwise_loglikelihoods` is the most important one, it seems a bit weird that we don't re-export the other two as well.
1 parent b6fa993 commit 9402c11

4 files changed

Lines changed: 23 additions & 13 deletions

File tree

HISTORY.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# 0.44.1
2+
3+
Re-export `pointwise_logdensities` and `pointwise_prior_logdensities` from DynamicPPL.
4+
15
# 0.44.0
26

37
## Breaking changes

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "Turing"
22
uuid = "fce5fe82-541a-59a6-adf8-730c64b5f9a0"
3-
version = "0.44"
3+
version = "0.44.1"
44

55
[deps]
66
ADTypes = "47edcb42-4c32-4615-8424-f2b9edc5f35b"

docs/src/api.md

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -92,18 +92,20 @@ even though [`Prior()`](@ref) is actually defined in the `Turing.Inference` modu
9292

9393
Please see the [generated quantities](https://turinglang.org/docs/tutorials/usage-generated-quantities/) and [probability interface](https://turinglang.org/docs/tutorials/usage-probability-interface/) guides for more information.
9494

95-
| Exported symbol | Documentation | Description |
96-
|:-------------------------- |:---------------------------------------------------------------------------------------------------------------------------- |:------------------------------------------------------- |
97-
| `returned` | [`DynamicPPL.returned`](https://turinglang.org/DynamicPPL.jl/stable/api/#DynamicPPL.returned-Tuple%7BModel,%20NamedTuple%7D) | Calculate additional quantities defined in a model |
98-
| `predict` | [`StatsAPI.predict`](https://turinglang.org/DynamicPPL.jl/stable/api/#Predicting) | Generate samples from posterior predictive distribution |
99-
| `pointwise_loglikelihoods` | [`DynamicPPL.pointwise_loglikelihoods`](@extref) | Compute log likelihoods for each sample in a chain |
100-
| `logprior` | [`DynamicPPL.logprior`](@extref) | Compute log prior probability |
101-
| `logjoint` | [`DynamicPPL.logjoint`](@extref) | Compute log joint probability |
102-
| `condition` | [`AbstractPPL.condition`](@extref) | Condition a model on data |
103-
| `decondition` | [`AbstractPPL.decondition`](@extref) | Remove conditioning on data |
104-
| `conditioned` | [`DynamicPPL.conditioned`](@extref) | Return the conditioned values of a model |
105-
| `fix` | [`DynamicPPL.fix`](@extref) | Fix the value of a variable |
106-
| `unfix` | [`DynamicPPL.unfix`](@extref) | Unfix the value of a variable |
95+
| Exported symbol | Documentation | Description |
96+
|:------------------------------ |:---------------------------------------------------------------------------------------------------------------------------- |:---------------------------------------------------------------------------- |
97+
| `returned` | [`DynamicPPL.returned`](https://turinglang.org/DynamicPPL.jl/stable/api/#DynamicPPL.returned-Tuple%7BModel,%20NamedTuple%7D) | Calculate additional quantities defined in a model |
98+
| `predict` | [`StatsAPI.predict`](https://turinglang.org/DynamicPPL.jl/stable/api/#Predicting) | Generate samples from posterior predictive distribution |
99+
| `pointwise_logdensities` | [`DynamicPPL.pointwise_logdensities`](@extref) | Compute log densities (both prior and likelihood) for each sample in a chain |
100+
| `pointwise_loglikelihoods` | [`DynamicPPL.pointwise_loglikelihoods`](@extref) | Compute log likelihoods for each sample in a chain |
101+
| `pointwise_prior_logdensities` | [`DynamicPPL.pointwise_prior_logdensities`](@extref) | Compute log priors for each sample in a chain |
102+
| `logprior` | [`DynamicPPL.logprior`](@extref) | Compute log prior probability |
103+
| `logjoint` | [`DynamicPPL.logjoint`](@extref) | Compute log joint probability |
104+
| `condition` | [`AbstractPPL.condition`](@extref) | Condition a model on data |
105+
| `decondition` | [`AbstractPPL.decondition`](@extref) | Remove conditioning on data |
106+
| `conditioned` | [`DynamicPPL.conditioned`](@extref) | Return the conditioned values of a model |
107+
| `fix` | [`DynamicPPL.fix`](@extref) | Fix the value of a variable |
108+
| `unfix` | [`DynamicPPL.unfix`](@extref) | Unfix the value of a variable |
107109

108110
### Initialisation strategies
109111

src/Turing.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,9 @@ using .Optimisation
5757
using DynamicPPL:
5858
@model,
5959
@varname,
60+
pointwise_logdensities,
6061
pointwise_loglikelihoods,
62+
pointwise_prior_logdensities,
6163
generated_quantities,
6264
returned,
6365
logprior,
@@ -155,7 +157,9 @@ export
155157
predict,
156158
# Querying model probabilities - DynamicPPL
157159
returned,
160+
pointwise_logdensities,
158161
pointwise_loglikelihoods,
162+
pointwise_prior_logdensities,
159163
logprior,
160164
loglikelihood,
161165
logjoint,

0 commit comments

Comments
 (0)