rowLogSumExps {matrixStats} | R Documentation |
Accurately computes the logarithm of the sum of exponentials across rows or columns
Description
Accurately computes the logarithm of the sum of exponentials across rows or columns.
Usage
rowLogSumExps(lx, rows = NULL, cols = NULL, na.rm = FALSE,
dim. = dim(lx), ..., useNames = TRUE)
colLogSumExps(lx, rows = NULL, cols = NULL, na.rm = FALSE,
dim. = dim(lx), ..., useNames = TRUE)
Arguments
lx |
|
rows , cols |
A |
na.rm |
If |
dim. |
An |
... |
Not used. |
useNames |
If |
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
().
[Package matrixStats version 1.3.0 Index]