logsumexp: Compute log(sum(exp(x),dim)) while avoiding numerical...

View source: R/util.R

logsumexpR Documentation

Compute log(sum(exp(x),dim)) while avoiding numerical underflow

Description

Compute log(sum(exp(x),dim)) while avoiding numerical underflow

Usage

logsumexp(x, margin = 1)

Arguments

x

a matrix

margin

used for apply

Value

log(sum(exp(x),dim)) a matrix of the sample size as x


keyuan/ccube documentation built on Jan. 11, 2023, 12:01 a.m.