Skip to content

Commit 0117858

Browse files
authored
Merge pull request #167 from fweber144/fix_mm_psis
Update normalizing constant of PSIS weights when moment matching
2 parents 582e18d + 150b2fb commit 0117858

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

NEWS.md

+5
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
* Switch unit tests from Travis to GitHub Actions. (#164)
44

5+
### Bug fixes
6+
7+
* Fixed a bug causing the normalizing constant of the PSIS (log) weights not
8+
to get updated when performing moment matching with `save_psis = TRUE` (#166, @fweber144).
9+
510
# loo 2.4.1
611

712
* Fixed issue reported by CRAN where one of the vignettes errored on an M1 Mac

R/loo_moment_matching.R

+1
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ loo_moment_match.default <- function(x, loo, post_draws, log_lik_i,
151151
}
152152
}
153153
if (!is.null(loo$psis_object)) {
154+
attr(loo$psis_object, "norm_const_log") <- matrixStats::colLogSumExps(loo$psis_object$log_weights)
154155
loo$psis_object$diagnostics <- loo$diagnostics
155156
}
156157

0 commit comments

Comments
 (0)