Skip to content

docs: update composed-distributions page to the DI readback surface (post CD#245) - #23

Closed
seabbs-bot wants to merge 1 commit into
mainfrom
cd245-approaches-fix
Closed

seabbs-bot wants to merge 1 commit into
mainfrom
cd245-approaches-fix

Conversation

@seabbs-bot

Copy link
Copy Markdown
Collaborator

Summary

approaches/composed-distributions.qmd documented update(template, chain) and param_draws(template, chain) for reading a fit back onto
a tree, and framed as_turing as ComposedDistributions' own. Both are
now stale:

  • ComposedDistributions#245 (merged) removed the FlexiChains
    chain-readback extension entirely; that surface now lives on
    DistributionsInference.jl as readback/readback_draws.
  • ComposedDistributions#233 moved as_turing to DistributionsInference.jl
    as 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, keeping update(template, table) as
ComposedDistributions' 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_turing
as building on DI's log-density/readback -- post-#233 that is backwards
for as_turing (DI hosts it directly, generically, over the
fit-protocol core), so it is reworded to match.

Phrasing matches ComposedDistributions' own post-#245
docs/src/getting-started/inference.md
guide for consistency across the org's docs.

I swept the rest of the page and the linked
composable-turing-models.qmd for the same staleness; nothing else
references the removed chain-readback surface (that page's
as_turing_model is an unrelated user-defined convention, not this
package's as_turing).

Self-review

  • quarto render approaches/composed-distributions.qmd builds
    clean, no warnings.
  • Only the intended file changed (_site build output is
    gitignored).

This was opened by a bot. Please ping @seabbs for any questions.

…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>
@github-actions

Copy link
Copy Markdown

📄 Site preview built

The rendered site for this PR is available as the site-preview artifact on this run. Download it and open _site/index.html to review.

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.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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

`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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

what happened to aslogdneisty and stuff?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants