I have three numbers:
lp_1 <- -316480
lp_2 <- -85041
lp_3 <- -1197042
The goal is to sample a multinomial distribution with probabilities proportional to the exp(lp_i)
. With these numbers, one gets 0
if one takes the exponential, and even if we set one number to 0
, we will not manage to get some probabilities proportional to exp(lp_i)
because we will get either 0
or Inf
when taking the exponential of the two other numbers.
Do you see any way to achieve this goal nevertheless? I think it's impossible, but I'd like to be sure.