Open eroehrig opened 6 years ago
No. Probabilities are multiplicative, while log-probabilities are additive. See https://github.com/zxytim/fast-gmm/blob/5b6940d62c950889d51d5a3dfc99907e3b631958/src/gmm.cc#L244
I think the probabilities of the different gaussians are additive (see at wikipedia). The example you gave me, is the sum of the log_probability of more than one datapoint. That refers to
where it is done correctly. Because the probabilities are summed up before the log operation. There should be no difference to GMM::probability_of except of the log operation in the end.
A Gaussian mixture model is a weighted sum of Gaussians. I would say +
is correct here.
https://github.com/zxytim/fast-gmm/blob/5b6940d62c950889d51d5a3dfc99907e3b631958/src/gmm.cc#L232-L235
It should be prob += weights[i] * gaussians[i]->probability_of(x), shouldn't it be?