Skip to content

Commit

Permalink
Merge pull request #167 from fweber144/fix_mm_psis
Browse files Browse the repository at this point in the history
Update normalizing constant of PSIS weights when moment matching
  • Loading branch information
jgabry authored May 19, 2021
2 parents 582e18d + 150b2fb commit 0117858
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

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

### Bug fixes

* Fixed a bug causing the normalizing constant of the PSIS (log) weights not
to get updated when performing moment matching with `save_psis = TRUE` (#166, @fweber144).

# loo 2.4.1

* Fixed issue reported by CRAN where one of the vignettes errored on an M1 Mac
Expand Down
1 change: 1 addition & 0 deletions R/loo_moment_matching.R
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ loo_moment_match.default <- function(x, loo, post_draws, log_lik_i,
}
}
if (!is.null(loo$psis_object)) {
attr(loo$psis_object, "norm_const_log") <- matrixStats::colLogSumExps(loo$psis_object$log_weights)
loo$psis_object$diagnostics <- loo$diagnostics
}

Expand Down

0 comments on commit 0117858

Please sign in to comment.