Skip to content
Prev 274742 / 398506 Next

Best practices for handling very small numbers?

On 11-10-18 4:30 AM, Seref Arikan wrote:
I think you are calculating the log likelihood incorrectly.  Don't 
calculate the likelihood and take the log; work out the formula for the 
log of the likelihood, and calculate that.  (If the likelihood contains 
a sum of terms, as in a mixture model, this takes some thinking, but it 
is still worthwhile.)

With most models, it is just about impossible to cause the log 
likelihood to underflow if it is calculated carefully.

Duncan Murdoch