4 ms·
I was dealing and implementing this last week. From what I understood, calculating log(a+b) from log(a) and log(b) has reasons other than underflow-overflow pr
by afsina 15y ago
I was dealing and implementing this last week. From what I understood, calculating log(a+b) from log(a) and log(b) has reasons other than underflow-overflow problem.
1- it is usually a necessity because For example in Speech Recognition and many NLP applications people always deal with log probabilities and log likelihoods.Yes they do it for running away from the underflow problem but all formulation and data is based on log.
2- Also, when dealing with log probabilities, it is possible to generate a look-up table to make this calculation much faster (Around 30 folds) with a good approximation instead of calculating the log(1+exp(log(b)-log(a))) part.
This is helpful for example when trying to find how likely a piece of speech signal is generated from an utterance of a letter (not formally speaking) using Gaussian Mixture Models. LogSum is extensively used there. It is also used in Forward-Backward algorithm used in Hidden Markov Model generation and decoding.
Edited for some grammar and missing information.
- tensor 15y agoUseful to you? https://github.com/akhudek/feast/blob/master/src/btl/trunk/btl/logint.h https://github.com/akhudek/feast/blob/master/src/btl/trunk/b...
- afsina 15y agoPretty good, thanks. But because I am using Java this may not be that useful for me. I will definitely check the math tough. I will send it to my colleague as well who deals with C++ GMMs.