barefoot icon indicating copy to clipboard operation
barefoot copied to clipboard

Question to emission

Open dvent89 opened this issue 6 years ago • 5 comments

https://github.com/bmwcarit/barefoot/blob/master/src/main/java/com/bmwcarit/barefoot/matcher/Matcher.java#L208

Why do we reduce the emission if we have a heading, should not we increase the emission value?

dvent89 avatar Feb 22 '18 17:02 dvent89

We do not reduce the emission, we add a probability weight. Of course, the product of the probabilities of emission and heading is naturally less or equals than the probability of the emission because probability is normalized to a relative value between 0 and 1, but what matters is the adjustment of the probability distribution over candidates because some candidates have higher and some have lower probability for observing a certain heading. If we normalize the products of the candidates afterwards, such that all the products sum up to 1, we would see that probabilities of some candidates in fact increased and some decreased. (In some cases we can skip the normalization because we only want to know the candidate with maximum probability which doesn't require normalization.)

smattheis avatar Feb 22 '18 22:02 smattheis

Hi sebastian,

thank you for your fast reply. Iam wondering on what is this formula based on. I could not find this in Newson and Krumm documents. The maximum "normalization" you can acquire is 0.01, this looks not feasbile for me .

dvent89 avatar Feb 23 '18 17:02 dvent89

The integration of heading angles as emission probabilities into the HMM algorithm as described by Newson and Krumm is standard mathematics. To get an overview, I recommend this book: https://www.amazon.de/Artificial-Intelligence-Modern-Approach-Global/dp/1292153962 see chapter 15 "Probabilisitic reasoning over time"

I don't know what you mean with "maximum normalization". I have to admit, the statement about "maximum normalization" and 0.01 makes no sense to me.

smattheis avatar Feb 24 '18 17:02 smattheis

emission *= Math.max(1E-2, 1 / sqrt_2pi_sigA * Math.exp((-1) * da / (2 * sigA))); The maximum use is not correct, mathemaical correct would be to use multiplikation of exponents.

emission = (1 / sqrt_2pi_sig2 * 1 / sqrt_2pi_sigA )* Math.exp((-1)* dz * dz / (2 * sig2) + (-1) * da *da / (2 * sigA));

so we escpae the multiplication of small numbers.

dvent89 avatar Mar 06 '18 12:03 dvent89

The use of Math.max is not what I would refer to as a normalization but a definition of a (relative!) minimum for the emission probability of candidates. Could you please provide some more details about your question or statement? It's quite difficult to understand your point without context.

smattheis avatar Mar 06 '18 13:03 smattheis