logsumexp | R Documentation |
Transfor a vector with over- or underflow
logsumexp(x, min_x = Inf)
x |
A vector with numbers |
min_x |
A numerical value to represent the minimum value to perform comparison with the actual minimum value of 'x' |
'logsumexp' returns each element of the vector 'x' transformed using the Log-Sum-Exp trick.
# Transforming all elements in a vector using the Log-Sum-Exp trick
x <- c(1, 2, 3, 4, 5, 6)
logsumexp(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.