colLogSumExps,DelayedMatrix-method | 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 = TRUE
)
## S4 method for signature 'DelayedMatrix'
rowLogSumExps(
lx,
rows = NULL,
cols = NULL,
na.rm = FALSE,
force_block_processing = FALSE,
...,
useNames = TRUE
)
lx |
A NxK DelayedMatrix. Typically, |
rows , cols |
A |
na.rm |
If |
force_block_processing |
|
... |
Additional arguments passed to specific methods. |
useNames |
If |
The S4 methods for x
of type matrix
,
array
, table
, 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.
rowSums2()
x <- DelayedArray(matrix(runif(10), ncol = 2))
colLogSumExps(log(x))
rowLogSumExps(log(x))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.