1
$\begingroup$

I am trying to implement in Python this ratio: $\frac{w_t(i)}{\sum w_t(j)}$ where $w_t(i) = w_{t-1}(i)\cdot\exp{(-x_{t}(i))}$, i.e. the weights are exponentially decreasing without running into underflow problems. I am using this ratio in a formula later. Has anyone had the same problem? Any ideas? I read a bit about the logsumexp trick but I am not sure I can use it here.

$\endgroup$
0
$\begingroup$

The solution may somewhat depend on your application. In general you can keep track of log-weights to minimize underflow issues (i.e. log-likelihoods; then the "logsumexp trick" could apply to the log of your normalization factor). However some weights will still effectively go to 0 eventually. In particle filtering this is known as the "sample degeneracy problem", and is typically solved with resampling (e.g. as in the bootstrap filter described in the above link).

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.