Skip to content

Commit e04d74c

Browse files
authored
docs: Build docs with ArviZExampleData v0.3 (#86)
* docs: Require ArviZExampleData v0.3 * docs: Update r2_score example to use new anes dataset * docs: Fix r2_score documented return value * chore: Increment patch number * chore: Update changelog
1 parent b2e8fd1 commit e04d74c

4 files changed

Lines changed: 13 additions & 6 deletions

File tree

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@
1212

1313
### Documentation
1414

15+
## v0.4.4 (2026-01-19)
16+
17+
### Documentation
18+
19+
- Build docs with ArviZExampleData v0.3 ([#86](https://github.com/arviz-devs/PosteriorStats.jl/pull/86))
20+
1521
## v0.4.3 (2025-11-24)
1622

1723
### Features

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "PosteriorStats"
22
uuid = "7f36be82-ad55-44ba-a5c0-b8b5480d7aa5"
33
authors = ["Seth Axen <seth@sethaxen.com> and contributors"]
4-
version = "0.4.3"
4+
version = "0.4.4"
55

66
[deps]
77
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"

docs/Project.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91"
1414
PosteriorStats = {path = ".."}
1515

1616
[compat]
17+
ArviZExampleData = "0.3"
1718
Documenter = "1"
1819
DocumenterCitations = "1.2"
1920
DocumenterInterLinks = "1"

src/r2_score.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
2-
r2_score(y_true::AbstractVector, y_pred::AbstractArray; kwargs...) -> (; r2, r2_std)
2+
r2_score(y_true::AbstractVector, y_pred::AbstractArray; kwargs...) -> (; r2, <ci_fun>)
33
44
``R²`` for linear Bayesian regression models.[Gelman2019](@citep)
55
@@ -36,14 +36,14 @@ credible interval (CI).
3636
```jldoctest
3737
julia> using ArviZExampleData
3838
39-
julia> idata = load_example_data("regression1d");
39+
julia> idata = load_example_data("anes");
4040
41-
julia> y_true = idata.observed_data.y;
41+
julia> y_true = idata.observed_data.vote;
4242
43-
julia> y_pred = PermutedDimsArray(idata.posterior_predictive.y, (:draw, :chain, :y_dim_0));
43+
julia> y_pred = PermutedDimsArray(idata.posterior_predictive.vote, (:draw, :chain, :__obs__));
4444
4545
julia> r2_score(y_true, y_pred)
46-
(r2 = 0.683196996216511, eti = 0.6230680117869596 .. 0.7384123771046265)
46+
(r2 = 0.4944850210319484, eti = 0.46184359652436546 .. 0.528018251711097)
4747
```
4848
4949
# References

0 commit comments

Comments
 (0)