Skip to content

Commit 4563c84

Browse files
committed
Update docstrings
1 parent 25d6616 commit 4563c84

File tree

2 files changed

+24
-24
lines changed

2 files changed

+24
-24
lines changed

ext/InferenceObjectsPosteriorStatsExt/loo_pit.jl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ julia> loo_result = loo(idata; var_name=:obs);
2727
2828
julia> loo_pit(idata, loo_result.psis_result.log_weights; y_name=:obs)
2929
┌ 8-element DimArray{Float64, 1} loo_pit_obs ┐
30-
├────────────────────────────────────────────┴─────────────────────────── dims ┐
31-
↓ school Categorical{String} [Choate, Deerfield, …, St. Paul's, Mt. Hermon] Unordered
32-
└──────────────────────────────────────────────────────────────────────────────
30+
├────────────────────────────────────────────┴─────────────────── dims ┐
31+
↓ school Categorical{String} ["Choate", …, "Mt. Hermon"] Unordered
32+
└──────────────────────────────────────────────────────────────────────┘
3333
"Choate" 0.942759
3434
"Deerfield" 0.641057
3535
"Phillips Andover" 0.32729
@@ -86,9 +86,9 @@ julia> idata = load_example_data("centered_eight");
8686
8787
julia> loo_pit(idata; y_name=:obs)
8888
┌ 8-element DimArray{Float64, 1} loo_pit_obs ┐
89-
├────────────────────────────────────────────┴─────────────────────────── dims ┐
90-
↓ school Categorical{String} [Choate, Deerfield, …, St. Paul's, Mt. Hermon] Unordered
91-
└──────────────────────────────────────────────────────────────────────────────
89+
├────────────────────────────────────────────┴─────────────────── dims ┐
90+
↓ school Categorical{String} ["Choate", …, "Mt. Hermon"] Unordered
91+
└──────────────────────────────────────────────────────────────────────┘
9292
"Choate" 0.942759
9393
"Deerfield" 0.641057
9494
"Phillips Andover" 0.32729

src/inference_data.jl

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -311,15 +311,15 @@ InferenceData with groups:
311311
julia> idata_cat1.posterior
312312
┌ 100×8×3 Dataset ┐
313313
├─────────────────┴──────────────────────────────────── dims ┐
314-
↓ draw ,
314+
↓ draw,
315315
→ chain,
316-
↗ a_dim Categorical{String} ["x", "y", "z"] ForwardOrdered
316+
↗ a_dim Categorical{String} ["x", , "z"] ForwardOrdered
317317
├──────────────────────────────────────────────────── layers ┤
318318
:a eltype: Float64 dims: draw, chain, a_dim size: 100×8×3
319319
:b eltype: Float64 dims: draw, chain size: 100×8
320320
├────────────────────────────────────────────────── metadata ┤
321321
Dict{String, Any} with 1 entry:
322-
"created_at" => "2025-02-04T10:49:16.704"
322+
"created_at" => "2025-07-25T10:11:18.92"
323323
```
324324
325325
Alternatively, we can concatenate along a new `run` dimension, which will be created.
@@ -331,17 +331,17 @@ InferenceData with groups:
331331
332332
julia> idata_cat2.posterior
333333
┌ 100×4×3×2 Dataset ┐
334-
├───────────────────┴─────────────────────────────────── dims ┐
335-
↓ draw ,
334+
├───────────────────┴───────────────────────────────────────── dims ┐
335+
↓ draw,
336336
→ chain,
337-
↗ a_dim Categorical{String} ["x", "y", "z"] ForwardOrdered,
337+
↗ a_dim Categorical{String} ["x", , "z"] ForwardOrdered,
338338
⬔ run
339-
├─────────────────────────────────────────────────────────────┴ layers
339+
├─────────────────────────────────────────────────────────── layers
340340
:a eltype: Float64 dims: draw, chain, a_dim, run size: 100×4×3×2
341341
:b eltype: Float64 dims: draw, chain, run size: 100×4×2
342-
├──────────────────────────────────────────────────────────── metadata ┤
342+
├───────────────────────────────────────────────────────── metadata ┤
343343
Dict{String, Any} with 1 entry:
344-
"created_at" => "2025-02-04T10:49:16.704"
344+
"created_at" => "2025-07-25T10:11:18.92"
345345
```
346346
347347
We can also concatenate only a subset of groups and merge the rest, which is useful when
@@ -363,27 +363,27 @@ InferenceData with groups:
363363
364364
julia> idata_cat3.posterior
365365
┌ 100×4×3×2 Dataset ┐
366-
├───────────────────┴─────────────────────────────────── dims ┐
367-
↓ draw ,
366+
├───────────────────┴───────────────────────────────────────── dims ┐
367+
↓ draw,
368368
→ chain,
369-
↗ a_dim Categorical{String} ["x", "y", "z"] ForwardOrdered,
369+
↗ a_dim Categorical{String} ["x", , "z"] ForwardOrdered,
370370
⬔ run
371-
├─────────────────────────────────────────────────────────────┴ layers
371+
├─────────────────────────────────────────────────────────── layers
372372
:a eltype: Float64 dims: draw, chain, a_dim, run size: 100×4×3×2
373373
:b eltype: Float64 dims: draw, chain, run size: 100×4×2
374-
├──────────────────────────────────────────────────────────── metadata ┤
374+
├───────────────────────────────────────────────────────── metadata ┤
375375
Dict{String, Any} with 1 entry:
376-
"created_at" => "2025-02-04T10:49:16.704"
376+
"created_at" => "2025-07-25T10:11:18.92"
377377
378378
julia> idata_cat3.observed_data
379379
┌ 10-element Dataset ┐
380-
├────────────── dims
380+
├────────────────────┴───────────────── dims
381381
↓ y_dim_1
382-
├─────────────────────────────────── layers
382+
├─────────────────────────────────── layers
383383
:y eltype: Float64 dims: y_dim_1 size: 10
384384
├────────────────────────────────────────────┴ metadata ┐
385385
Dict{String, Any} with 1 entry:
386-
"created_at" => "2025-02-04T10:49:16.71"
386+
"created_at" => "2025-07-25T10:11:18.951"
387387
```
388388
"""
389389
function Base.cat(data::InferenceData, others::InferenceData...; groups=keys(data), dims)

0 commit comments

Comments
 (0)