Repository navigation
docs: update composed-distributions page to the DI readback surface (post CD#245) - #23
Closed
seabbs-bot wants to merge 1 commit into
Closed
seabbs-bot wants to merge 1 commit into
seabbs-bot wants to merge 1 commit into
Conversation
…surface ComposedDistributions#245 removed the FlexiChains chain-readback extension (update(template, chain), param_draws) in favour of DistributionsInference's readback/readback_draws, and #233 moved as_turing to DistributionsInference too. Reword the "read the posterior back" section to readback/readback_draws/distribution_params, keeping update(template, table) as ComposedDistributions' own bulk-edit verb, and fix the DI "where next" pointer's framing of as_logdensity/ as_turing to match, matching the phrasing on ComposedDistributions' own post-#245 inference.md guide. Co-authored-by: Sam Abbott <contact@samabbott.co.uk>
📄 Site preview builtThe rendered site for this PR is available as the site-preview artifact on this run. Download it and open |
seabbs
reviewed
Jul 20, 2026
| After fitting, the posterior is read back by applying the parameter draws to the same tree. | ||
| `update(template, chain)` reduces the chain to a point summary and returns one fitted tree; `update(template, table)` does the same from a Tables.jl table of values or priors, for a bulk edit outside a sampling loop. | ||
| Reading every draw rather than a point summary maps `update` over `param_draws(template, chain)`, so every delay mean, convolution, or contrast still comes from the fitted object itself, one draw at a time. | ||
| [DistributionsInference.jl](https://github.com/EpiAware/DistributionsInference.jl)'s `readback(template, chain)` reduces a fitted chain to a point summary and returns one fitted tree; `update(template, table)` does the equivalent from a Tables.jl table of values or priors, for a bulk edit outside a sampling loop. |
Member
There was a problem hiding this comment.
Why is this now called readback? I quite liked update can't it extend the method or similar or I guess that is mild type pyracy? Could we use DataFrame on a method and get the table and then do update .hmmm dfor the draws point etc I Wouold have though a param swich would be nicer than a new function
seabbs
reviewed
Jul 20, 2026
| `param_priors` does for a tree, and `distribution_params` reads a fitted | ||
| chain back to the estimated values by name, whatever fittable object it | ||
| came from. | ||
| hosts a PPL-neutral log-density, `as_turing`, and chain readback |
Member
There was a problem hiding this comment.
what happened to aslogdneisty and stuff?
Member
There was a problem hiding this comment.
hmm distribution priors hold be for all trees and dists shouldn't it or both use param_priors? maybe the latter makes sense not sure?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
approaches/composed-distributions.qmddocumentedupdate(template, chain)andparam_draws(template, chain)for reading a fit back ontoa tree, and framed
as_turingas ComposedDistributions' own. Both arenow stale:
chain-readback extension entirely; that surface now lives on
DistributionsInference.jl as
readback/readback_draws.as_turingto DistributionsInference.jlas well, so a tree no longer carries its own.
This PR rewords the "Read the posterior back through the same tree"
section to
readback(template, chain)/readback_draws(template, chain)/distribution_params, keepingupdate(template, table)asComposedDistributions' own bulk-edit verb (unaffected by #245 -- only
the chain-shaped overload was removed). It also fixes the "Where next"
DistributionsInference pointer, which framed
as_logdensity/as_turingas building on DI's log-density/readback -- post-#233 that is backwards
for
as_turing(DI hosts it directly, generically, over thefit-protocol core), so it is reworded to match.
Phrasing matches ComposedDistributions' own post-#245
docs/src/getting-started/inference.mdguide for consistency across the org's docs.
I swept the rest of the page and the linked
composable-turing-models.qmdfor the same staleness; nothing elsereferences the removed chain-readback surface (that page's
as_turing_modelis an unrelated user-defined convention, not thispackage's
as_turing).Self-review
quarto render approaches/composed-distributions.qmdbuildsclean, no warnings.
_sitebuild output isgitignored).
This was opened by a bot. Please ping @seabbs for any questions.