Description Usage Arguments Value
View source: R/05-posthoc-quantities.R
Simple implementation of the trapezoid rule for integration. The key is that this function accepts grid points and LOGGED function values and computes the integral in a numerically stable manner, using matrixStats::logSumExp().
For a single hyperparameter, the function works on uniform and non-uniform grids. For a multidimensional hyperparameter, the function only works on a uniform grid (in all dimensions).
1 | normalize_log_posterior(pp, tt)
|
pp |
logged function values |
tt |
grid points at which these function values were computed, as a NIGrid object |
A number giving the LOG of the integral of the function used to compute pp. This is the log-normalizing constant.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.