nimble-dev / nimbleSMC

Sequential Monte Carlo methods for NIMBLE
2 stars 2 forks source link

avoid underflow by keeping weights on log scale #4

Closed paciorek closed 3 years ago

paciorek commented 3 years ago

This addresses the problem a user ran into where exponentiating large magnitude negative log weights causes underflow. Updates bootstrap, auxiliary, Liu-West and IF2 to keep weights on log scale when possible and subtract off max log weight as needed (log-sum-exp trick) to avoid underflow.