Questions tagged [logsumexp]
3 questions
7
votes
3 answers
log(1 - softmax(X))?
Let $\vec X$ be a vector. The $\vec V = \mathrm{logsoftmax}(\vec{X})$ function is defined as:
$$v_i = \ln\left(\frac{e^{x_i}}{\sum_i e^{x_i}}\right)$$
This is provided in machine learning numerical packages for numerical stability.
Is there a…

becko
- 3,298
- 1
- 19
- 36
3
votes
1 answer
What is the use of the log of the sum of exponents in machine learning
I want to understand why somebody would use log sum exponent trick.
I am reading this blog.
But I don't really understand the first paragraph.
It says
Let's say we have an n-dimensional vector and want to calculate:
$$y=\sum_{i=1}^n…

Funzo
- 131
- 6
2
votes
1 answer
Vectorised computation of logsumexp
In this related post there is an explanation of how you can add together two very small probabilities using the logsumexp function, and how this can be programmed into base R. How can this method be extended to get a general vectorised function…

Ben
- 91,027
- 3
- 150
- 376