Skip to content

Commit d86e007

Browse files
authored
Backport Julia lower bound as v1.8 (#53)
* Bump Julia lower bound to v1.8 * Update versions of Julia being tested * Bump patch number * Add docs compat entry for ArviZExampleData * Update doctests
1 parent c3aaddd commit d86e007

File tree

6 files changed

+15
-15
lines changed

6 files changed

+15
-15
lines changed

.github/workflows/CI.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,10 @@ jobs:
1818
fail-fast: false
1919
matrix:
2020
version:
21+
- '1.8'
22+
- 'lts'
2123
- '1'
22-
- '1.6'
23-
- 'nightly'
24+
- 'pre'
2425
os:
2526
- ubuntu-latest
2627
arch:

Project.toml

Lines changed: 2 additions & 2 deletions
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 <[email protected]> and contributors"]
4-
version = "0.2.5"
4+
version = "0.2.6"
55

66
[deps]
77
Compat = "34da2185-b29b-5c13-b0c7-acf172513d20"
@@ -53,7 +53,7 @@ StatsBase = "0.33.7, 0.34"
5353
TableOperations = "1"
5454
TableTraits = "1"
5555
Tables = "1.9"
56-
julia = "1.6"
56+
julia = "1.8"
5757

5858
[extras]
5959
ArviZExampleData = "2f96bb34-afd9-46ae-bcd0-9b2d4372fe3c"

docs/Project.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@ Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
77
StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91"
88

99
[compat]
10+
ArviZExampleData = "0.1.5"
1011
Documenter = "1"

src/loo_pit.jl

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,8 @@ julia> log_like = PermutedDimsArray(idata.log_likelihood.obs, (:draw, :chain, :s
5858
julia> log_weights = loo(log_like).psis_result.log_weights;
5959
6060
julia> loo_pit(y, y_pred, log_weights)
61-
╭───────────────────────────────╮
62-
│ 8-element DimArray{Float64,1} │
63-
├───────────────────────────────┴──────────────────────────────────────── dims ┐
61+
┌ 8-element DimArray{Float64, 1} ┐
62+
├────────────────────────────────┴─────────────────────────────────────── dims ┐
6463
↓ school Categorical{String} [Choate, Deerfield, …, St. Paul's, Mt. Hermon] Unordered
6564
└──────────────────────────────────────────────────────────────────────────────┘
6665
"Choate" 0.943511
@@ -86,9 +85,8 @@ julia> T = y .- median(mu);
8685
julia> T_pred = y_pred .- mu;
8786
8887
julia> loo_pit(T .^ 2, T_pred .^ 2, log_weights)
89-
╭───────────────────────────────╮
90-
│ 8-element DimArray{Float64,1} │
91-
├───────────────────────────────┴──────────────────────────────────────── dims ┐
88+
┌ 8-element DimArray{Float64, 1} ┐
89+
├────────────────────────────────┴─────────────────────────────────────── dims ┐
9290
↓ school Categorical{String} [Choate, Deerfield, …, St. Paul's, Mt. Hermon] Unordered
9391
└──────────────────────────────────────────────────────────────────────────────┘
9492
"Choate" 0.873577

src/model_weights.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ Now we compute [`BootstrappedPseudoBMA`](@ref) weights for the same models:
6161
```jldoctest model_weights; setup = :(using Random; Random.seed!(94))
6262
julia> model_weights(elpd_results; method=BootstrappedPseudoBMA()) |> pairs
6363
pairs(::NamedTuple) with 2 entries:
64-
:centered => 0.483723
65-
:non_centered => 0.516277
64+
:centered => 0.483727
65+
:non_centered => 0.516273
6666
```
6767
"""
6868
function model_weights(elpd_results; method::AbstractModelWeightsMethod=Stacking())

src/summarize.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ julia> x = randn(1000, 4, 3) .+ reshape(0:10:20, 1, 1, :);
194194
julia> summarize(x, mean, std, :mcse_mean => sem; name="Mean/Std")
195195
Mean/Std
196196
mean std mcse_mean
197-
1 0.0003 0.990 0.016
197+
1 0.0003 0.989 0.016
198198
2 10.02 0.988 0.016
199199
3 19.98 0.988 0.016
200200
```
@@ -204,7 +204,7 @@ Avoid recomputing the mean by using `mean_and_std`, and provide parameter names:
204204
julia> summarize(x, (:mean, :std) => mean_and_std, mad; var_names=[:a, :b, :c])
205205
SummaryStats
206206
mean std mad
207-
a 0.000305 0.990 0.978
207+
a 0.000275 0.989 0.978
208208
b 10.0 0.988 0.995
209209
c 20.0 0.988 0.979
210210
```
@@ -229,7 +229,7 @@ names:
229229
julia> summarize(x, default_stats(; prob_interval=0.89)...; var_names=[:a, :b, :c])
230230
SummaryStats
231231
mean std hdi_5.5% hdi_94.5%
232-
a 0.000305 0.990 -1.63 1.52
232+
a 0.000275 0.989 -1.63 1.52
233233
b 10.0 0.988 8.53 11.6
234234
c 20.0 0.988 18.5 21.6
235235
```

0 commit comments

Comments
 (0)