rowLogSumExps: Accurately computes the logarithm of the sum of exponentials...

Description Usage Arguments Value Benchmarking Author(s) See Also

View source: R/rowLogSumExps.R

Description

Accurately computes the logarithm of the sum of exponentials across rows or columns.

Usage

1
2
 rowLogSumExps(lx, na.rm=FALSE, ...)
 colLogSumExps(lx, na.rm=FALSE, ...)

Arguments

lx

A numeric NxK matrix. Typically lx are log(x) values.

na.rm

If TRUE, any missing values are ignored, otherwise not.

...

Not used.

Value

A numeric vector of length N (K).

Benchmarking

These methods are implemented in native code and have been optimized for speed and memory.

Author(s)

Native implementation by Henrik Bengtsson. Original R code by Nakayama ??? (Japan).

See Also

To calculate the same on vectors, logSumExp().


matrixStats documentation built on May 31, 2017, 2:26 a.m.