Repository navigation
docs: update composed-distributions page to the DI readback surface (post CD#245) #23
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -171,8 +171,8 @@ There is no translation step between the delay model, the infection model, and t | |
| ### Read the posterior back through the same tree | ||
|
|
||
| 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. | ||
| Reading every draw rather than a point summary uses `readback_draws(template, chain)`, so every delay mean, convolution, or contrast still comes from the fitted object itself, one draw at a time; `distribution_params` reads the same chain back to named values for any fittable object, tree or otherwise. | ||
| Nothing is recomputed in separate post-processing that could drift from the model. | ||
|
|
||
| ## Where next | ||
|
|
@@ -194,11 +194,12 @@ Nothing is recomputed in separate post-processing that could drift from the mode | |
| models. | ||
| - Fitting outside Turing, or fitting a plain struct alongside a tree? | ||
| [DistributionsInference.jl](https://github.com/EpiAware/DistributionsInference.jl) | ||
| hosts the PPL-neutral log-density and readback that `as_logdensity` and | ||
| `as_turing` build on: `distribution_priors` assembles priors the same way | ||
| `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. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what happened to aslogdneisty and stuff?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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? |
||
| (`readback`/`readback_draws`) that work generically over the fit-protocol | ||
| core a composed tree and a plain struct both satisfy: `distribution_priors` | ||
| assembles priors the same way `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. | ||
| - Ready to fit a full model with infection dynamics? See the | ||
| [composable Turing models approach](composable-turing-models.qmd). | ||
|
|
||
|
|
||
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.
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