Skip to content

Commit 9eb05c2

Browse files
authored
Use generic 'ArviZ object' phrasing instead of 'DataTree' in user-facing docs (#25)
PR #21 added support for arviz <1.0 (InferenceData) alongside >=1.0 (DataTree). This change removes DataTree-specific language from all user-facing doc files so the phrasing works regardless of arviz version.
1 parent 5a1ed15 commit 9eb05c2

7 files changed

Lines changed: 8 additions & 8 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
> A tidybayes-inspired data layer for declarative Bayesian visualisation in Python
66
7-
`tidydraws` turns MCMC output (ArviZ `DataTree`) into tidy Polars frames that are ready to plot — one `.to_pandas()` away from any ggplot-like backend. It does no plotting itself. Three functions, three spaces:
7+
`tidydraws` turns MCMC output (ArviZ) into tidy Polars frames that are ready to plot — one `.to_pandas()` away from any ggplot-like backend. It does no plotting itself. Three functions, three spaces:
88

99
| Function | Space | Plot archetype |
1010
| --- | --- | --- |

docs/examples/01-parameter_draws.qmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: "Fit a PyMC model, extract posterior draws with parameter_draws(),
44
status: stable
55
---
66

7-
`parameter_draws()` is the entry point for parameter-space plots: it pulls posterior draws out of an ArviZ `DataTree` into a tidy Polars `DataFrame` — one row per `chain × draw × coordinate`, each variable a column. This example starts with simulated observed data, fits a real PyMC model, and then uses the resulting posterior draws for densities, intervals, contrasts, and cross-parameter plots.
7+
`parameter_draws()` is the entry point for parameter-space plots: it pulls posterior draws out of an ArviZ object into a tidy Polars `DataFrame` — one row per `chain × draw × coordinate`, each variable a column. This example starts with simulated observed data, fits a real PyMC model, and then uses the resulting posterior draws for densities, intervals, contrasts, and cross-parameter plots.
88

99
## Auto-detected dimensions
1010

docs/examples/02-compare_draws.qmd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: "Fit a PyMC model, compare prior and posterior draws with compare_d
44
status: stable
55
---
66

7-
`compare_draws()` is the prior/posterior comparison helper: it calls `parameter_draws()` once per selected group in the ArviZ `DataTree`, tags each result with a `source` column, and stacks them into a single `DataFrame`. By default it compares `posterior` against `prior`, which is the workflow most users need after fitting a PyMC model.
7+
`compare_draws()` is the prior/posterior comparison helper: it calls `parameter_draws()` once per selected group in the ArviZ object, tags each result with a `source` column, and stacks them into a single `DataFrame`. By default it compares `posterior` against `prior`, which is the workflow most users need after fitting a PyMC model.
88

99
## Full PyMC workflow
1010

@@ -250,4 +250,4 @@ ci = td.point_interval(compare, "beta", group_by=["groups", "source"], probs=(0.
250250

251251
:::
252252

253-
`group_name` sets the source column's name, and `groups` can compare other `DataTree` groups when needed. Next, join posterior expectations to covariates with [`prediction_draws()`](prediction_draws.qmd).
253+
`group_name` sets the source column's name, and `groups` can compare other ArviZ groups when needed. Next, join posterior expectations to covariates with [`prediction_draws()`](prediction_draws.qmd).

docs/examples/03-prediction_draws.qmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ status: stable
66

77
`prediction_draws()` joins posterior prediction draws such as `mu` to covariates, producing one tidy row per `chain × draw × observation`. Parameters are deliberately **excluded** — prediction space stays separate from parameter space, so coefficients never get duplicated across observations.
88

9-
Pass a `DataFrame` when you want explicit control over the covariates used for plotting. With `newdata=None`, `prediction_draws()` reads covariates from a constant-data group in the `DataTree` and fails loudly if that group is missing.
9+
Pass a `DataFrame` when you want explicit control over the covariates used for plotting. With `newdata=None`, `prediction_draws()` reads covariates from a constant-data group in the ArviZ object and fails loudly if that group is missing.
1010

1111
## Full PyMC workflow
1212

docs/examples/04-showcase.qmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: "Stress-test tidydraws across model archetypes — one canonical pl
44
status: experimental
55
---
66

7-
`tidydraws` is tested against synthetic DataTrees. This page stress-tests the full pipeline — PyMC model → `DataTree``parameter_draws` / `prediction_draws` / `compare_draws` → plot — across eight model archetypes that each exercise a different code path. If this page builds, the data layer survived that shape. If it breaks, you know exactly which archetype is the culprit.
7+
`tidydraws` is tested against synthetic ArviZ objects. This page stress-tests the full pipeline — PyMC model → ArviZ object`parameter_draws` / `prediction_draws` / `compare_draws` → plot — across eight model archetypes that each exercise a different code path. If this page builds, the data layer survived that shape. If it breaks, you know exactly which archetype is the culprit.
88

99
```{python}
1010
# | code-fold: true

great-docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ sections:
3232
# API Reference ---------------------------------------------------------------
3333
reference:
3434
- title: Functions
35-
desc: Extract, join, and summarise tidy draws from ArviZ DataTrees.
35+
desc: Extract, join, and summarise tidy draws from ArviZ objects.
3636
contents:
3737
- parameter_draws
3838
- prediction_draws

index.qmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ title: "tidydraws"
66
![](docs/assets/logo.jpg)
77
A tidybayes-inspired data layer for declarative Bayesian visualisation in Python.
88

9-
`tidydraws` turns MCMC output (ArviZ `DataTree`) into tidy Polars frames that are ready to plot — one `.to_pandas()` away from any ggplot-like backend. It does no plotting itself. Four functions, four roles:
9+
`tidydraws` turns MCMC output (ArviZ) into tidy Polars frames that are ready to plot — one `.to_pandas()` away from any ggplot-like backend. It does no plotting itself. Four functions, four roles:
1010

1111
| Function | Role | Plot archetype |
1212
| --- | --- | --- |

0 commit comments

Comments
 (0)