log_sum_exp: Compute stable log-sum-exp

Description Usage Arguments Value Author(s) References

View source: R/utils.R

Description

log_sum_exp computes the log sum exp trick for avoiding numeric underflow and have numeric stability in computations of small numbers.

Usage

1

Arguments

x

A vector of observations

Value

The logs-sum-exp value

Author(s)

C.A.Kapourani C.A.Kapourani@ed.ac.uk

References

https://hips.seas.harvard.edu/blog/2013/01/09/computing-log-sum-exp/


Melissa documentation built on Nov. 8, 2020, 5:37 p.m.