log_sum_exp: Rethinking utility functions

Description Usage Arguments Details Author(s)

Description

Numerically stable computation of log sums of exponentiated values.

Usage

1

Arguments

x

vector of values

Details

This function is used by WAIC to compute the log average probability used in the formula for WAIC. In that context, a vector of log-probabilities is passed to log_sum_exp, obviating the need to explicitly exponentiate. This helps to avoid rounding errors that occur when working with direct probabilities.

Author(s)

Richard McElreath


joepowers16/rethinking documentation built on June 2, 2019, 6:52 p.m.