I am writing an algorithm where, given the model, I calculate the probabilities for the list of data sets, and then I have to normalize (to the likelihood) each of the likelihoods. Thus, it is possible that something like [0.00043, 0.00004, 0.00321] may be like [0.2, 0.03, 0.77]. My problem is that the probability of registration with which I work is rather small (for example, in the log space the values ββare -269647.432, -231444.981, etc.). In my C ++ code, when I try to add two of them (taking their exponent), I get a response from "Inf". I tried adding them to log-space (summing / subtracting the log) , but came across the same problem again.
Can anyone share their expert opinion on this?
thanks
Ikram source share