Skip to content

Commit 8502999

Browse files
authored
Merge pull request #346 from stan-dev/master
Update use-posterior-gpdfit branch
2 parents 099398b + 23f2117 commit 8502999

88 files changed

Lines changed: 522 additions & 1674 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.Rbuildignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,15 @@ man-roxygen/*
1212
tests/testthat/Rplots\.pdf
1313
^data-raw$
1414
vignettes/loo2-lfo_cache/*
15-
vignettes/loo2-non-factorizable_cache/*
15+
vignettes/loo2-non-factorized_cache/*
1616
^\.appveyor\.yml$
1717
^\.codecov\.yml$
1818
.github/*
19+
.vscode/*
1920
^\.github$
2021
^vignettes/online-only$
2122

2223
^CRAN-SUBMISSION$
2324
^release-prep\.R$
25+
^_pkgdown\.yml$
26+
^pkgdown$

.gitattributes

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
* text=auto
22
data/* binary
3-
src/* text=lf
4-
R/* text=lf
3+
src/* text eol=lf
4+
R/* text eol=lf
5+
*.rda binary
6+

.github/dependabot.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
5+
6+
version: 2
7+
updates:
8+
- package-ecosystem: "github-actions"
9+
directory: "/" # Location of package manifests
10+
schedule:
11+
interval: "weekly"

.github/workflows/R-CMD-check.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
R_KEEP_PKG_SOURCE: yes
3131

3232
steps:
33-
- uses: actions/checkout@v4
33+
- uses: actions/checkout@v6
3434

3535
- uses: r-lib/actions/setup-pandoc@v2
3636

.github/workflows/pkgdown.yaml

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
2+
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
3+
on:
4+
# build dev site on merged pushes
5+
push:
6+
branches: [main, master]
7+
# build full site on releases
8+
release:
9+
types: [published]
10+
workflow_dispatch:
11+
12+
name: pkgdown.yaml
13+
14+
jobs:
15+
pkgdown:
16+
runs-on: ubuntu-latest
17+
# Only restrict concurrency for non-PR jobs
18+
concurrency:
19+
group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }}
20+
cancel-in-progress: true
21+
env:
22+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
23+
permissions:
24+
contents: write
25+
steps:
26+
- uses: actions/checkout@v6
27+
28+
- uses: r-lib/actions/setup-pandoc@v2
29+
30+
- uses: r-lib/actions/setup-r@v2
31+
with:
32+
use-public-rspm: true
33+
34+
- uses: r-lib/actions/setup-r-dependencies@v2
35+
with:
36+
extra-packages: |
37+
any::pkgdown
38+
local::.
39+
any::bayesplot
40+
any::BH
41+
any::brms
42+
any::ggplot2
43+
any::rmarkdown
44+
any::Rcpp
45+
any::RcppEigen
46+
any::RcppParallel
47+
any::rstan
48+
any::rstanarm
49+
any::rstantools
50+
any::spdep
51+
any::StanHeaders
52+
any::knitr
53+
any::withr
54+
stan-dev/pkgdown-config
55+
56+
- name: Build site
57+
run: |
58+
withr::with_envvar(
59+
c("NOT_CRAN" = "true"), # this should already be set by setup-r@v2? keeping because vignettes don't build otherwise
60+
pkgdown::build_site_github_pages(
61+
lazy = FALSE, # change to TRUE if runner times out.
62+
run_dont_run = TRUE,
63+
new_process = TRUE
64+
)
65+
)
66+
shell: Rscript {0}
67+
68+
- name: Deploy to GitHub pages 🚀
69+
uses: JamesIves/github-pages-deploy-action@v4
70+
with:
71+
clean: false
72+
branch: gh-pages
73+
folder: docs

.github/workflows/test-coverage.yaml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ on:
77

88
name: test-coverage.yaml
99

10-
permissions: read-all
10+
permissions:
11+
contents: read
12+
id-token: write
1113

1214
jobs:
1315
test-coverage:
@@ -16,7 +18,7 @@ jobs:
1618
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
1719

1820
steps:
19-
- uses: actions/checkout@v4
21+
- uses: actions/checkout@v6
2022

2123
- uses: r-lib/actions/setup-r@v2
2224
with:
@@ -34,17 +36,18 @@ jobs:
3436
clean = FALSE,
3537
install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package")
3638
)
39+
print(cov)
3740
covr::to_cobertura(cov)
3841
shell: Rscript {0}
3942

40-
- uses: codecov/codecov-action@v4
43+
- uses: codecov/codecov-action@v6
4144
with:
42-
# Fail if error if not on PR, or if on PR and token is given
45+
# Fail if error if not on PR, or if on PR and token is given--dependabot is treated like fork
4346
fail_ci_if_error: ${{ github.event_name != 'pull_request' || secrets.CODECOV_TOKEN }}
44-
file: ./cobertura.xml
45-
plugin: noop
47+
files: ./cobertura.xml
48+
plugins: noop
4649
disable_search: true
47-
token: ${{ secrets.CODECOV_TOKEN }}
50+
use_oidc: true
4851

4952
- name: Show testthat output
5053
if: always()
@@ -55,7 +58,7 @@ jobs:
5558

5659
- name: Upload test results
5760
if: failure()
58-
uses: actions/upload-artifact@v4
61+
uses: actions/upload-artifact@v7
5962
with:
6063
name: coverage-test-failures
6164
path: ${{ runner.temp }}/package

CRAN-SUBMISSION

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
Version: 2.8.0
2-
Date: 2024-07-03 16:27:12 UTC
3-
SHA: 23e68bf5fb8aa9d000358f3bbbf52cf7ee92a99c
1+
Version: 2.9.0
2+
Date: 2025-12-22 18:21:47 UTC
3+
SHA: fd95b46e4868019ff05034384f28f12960f69f33

DESCRIPTION

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
Type: Package
22
Package: loo
33
Title: Efficient Leave-One-Out Cross-Validation and WAIC for Bayesian Models
4-
Version: 2.8.0.9000
5-
Date: 2024-07-03
4+
Version: 2.9.0.9000
5+
Date: 2025-12-22
66
Authors@R: c(
7-
person("Aki", "Vehtari", , "Aki.Vehtari@aalto.fi", role = "aut"),
8-
person("Jonah", "Gabry", , "jsg2201@columbia.edu", role = c("cre", "aut")),
7+
person("Aki", "Vehtari", email = "Aki.Vehtari@aalto.fi", role = "aut"),
8+
person("Jonah", "Gabry", email = "jgabry@gmail.com", role = c("cre", "aut")),
99
person("Måns", "Magnusson", role = "aut"),
1010
person("Yuling", "Yao", role = "aut"),
1111
person("Paul-Christian", "Bürkner", role = "aut"),
@@ -14,9 +14,10 @@ Authors@R: c(
1414
person("Ben", "Goodrich", role = "ctb"),
1515
person("Juho", "Piironen", role = "ctb"),
1616
person("Bruno", "Nicenboim", role = "ctb"),
17-
person("Leevi", "Lindgren", role = "ctb")
17+
person("Leevi", "Lindgren", role = "ctb"),
18+
person("Visruth", "Srimath Kandali", role = "ctb")
1819
)
19-
Maintainer: Jonah Gabry <jsg2201@columbia.edu>
20+
Maintainer: Jonah Gabry <jgabry@gmail.com>
2021
Description: Efficient approximate leave-one-out cross-validation (LOO)
2122
for Bayesian models fit using Markov chain Monte Carlo, as described
2223
in Vehtari, Gelman, and Gabry (2017) <doi:10.1007/s11222-016-9696-4>.
@@ -58,5 +59,5 @@ Config/testthat/start-first: loo_subsampling_cases, loo_subsampling
5859
Encoding: UTF-8
5960
LazyData: TRUE
6061
Roxygen: list(markdown = TRUE)
61-
RoxygenNote: 7.3.2
62+
RoxygenNote: 7.3.3
6263
SystemRequirements: pandoc (>= 1.12.3), pandoc-citeproc

NEWS.md

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,23 @@
1-
# loo 2.8.0.9000
1+
# loo (development version)
2+
3+
# loo 2.9.0
4+
5+
* Avoid under and overflows in stacking by @avehtari in #273
6+
* Fix `kfold_split_stratified()` when a group has 1 observation by @jgabry in #278
7+
* Fix `plot_diagnostic(..., label_points = TRUE)` by @annariha in #288
8+
* Use testthat 3e and rely on posterior for ESS by @VisruthSK in #289
9+
* Fixed NAs in `psis_r_eff()` by @VisruthSK in #301
10+
* Print unequal sample sizes in loo_compare by @VisruthSK in #307
11+
* New website theme and pkgdown workflow by @VisruthSK in #292
12+
* Small fix in `loo_model_weights()` doc by @avehtari in #276
13+
* loo_moment_match.R: fix doc for default k_threshold by @jgabry in #279
14+
* Update scrps reference and improve doc by @avehtari in #280
15+
* Fix url in vignette by @jgabry in #282
16+
* Update stacking citation in inst/CITATION by @jgabry in #284
17+
* Added contribution section. by @VisruthSK in #286
18+
* Update LOO uncertainty paper to use BA doi by @avehtari in #311
19+
* Update documentation for `E_loo()` function by @avehtari in #312
220

3-
Items for next release go here
421

522
# loo 2.8.0
623

R/E_loo.R

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
#' Compute weighted expectations
22
#'
33
#' The `E_loo()` function computes weighted expectations (means, variances,
4-
#' quantiles) using the importance weights obtained from the
5-
#' [PSIS][psis()] smoothing procedure. The expectations estimated by the
6-
#' `E_loo()` function assume that the PSIS approximation is working well.
4+
#' quantiles) using the importance weights obtained from the [PSIS][psis()]
5+
#' smoothing procedure. The expectations estimated by the `E_loo()` function
6+
#' assume that the PSIS approximation is working well.
77
#' **A small [Pareto k][pareto-k-diagnostic] estimate is necessary,
8-
#' but not sufficient, for `E_loo()` to give reliable estimates.** Additional
9-
#' diagnostic checks for gauging the reliability of the estimates are in
10-
#' development and will be added in a future release.
8+
#' but not sufficient, for `E_loo()` to give reliable estimates**. If the
9+
#' `log_ratios` argument is provided, `E_loo()` also computes a function
10+
#' specific Pareto k diagnostic, which must also be small for a reliable
11+
#' estimate. See more details below.
1112
#'
1213
#' @export
1314
#' @param x A numeric vector or matrix.

0 commit comments

Comments
 (0)