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.