| colLogSumExps,DelayedMatrix-method {DelayedMatrixStats} | R Documentation |
Accurately calculates the logarithm of the sum of exponentials for each row (column) of a matrix-like object.
## S4 method for signature 'DelayedMatrix' colLogSumExps( lx, rows = NULL, cols = NULL, na.rm = FALSE, force_block_processing = FALSE, ..., useNames = NA ) ## S4 method for signature 'DelayedMatrix' rowLogSumExps( lx, rows = NULL, cols = NULL, na.rm = FALSE, force_block_processing = FALSE, ..., useNames = NA )
lx |
A NxK DelayedMatrix. Typically, |
rows |
A |
cols |
A |
na.rm |
|
force_block_processing |
|
... |
Additional arguments passed to specific methods. |
useNames |
If |
The S4 methods for x of type matrix,
array, or numeric call
matrixStats::rowLogSumExps
/ matrixStats::colLogSumExps.
Returns a numeric vector of length N (K).
Peter Hickey
matrixStats::rowLogSumExps() and
matrixStats::colLogSumExps()
which are used when the input is a matrix or numeric vector.
x <- DelayedArray(matrix(runif(10), ncol = 2)) colLogSumExps(log(x)) rowLogSumExps(log(x))