I am trying to evaluate the log-likelihood of a mixture of weibull distributions and am running into problems with the numerical aspect. In short, I have $M$ mixtures and want to evaluate: $$ \log \left[ \sum_{m=1}^M \pi_m \frac{\beta_m}{\alpha_m} \left( \frac{x}{\alpha_m}\right)^{\beta_m -1} e^{-\left( \frac{x}{\alpha_m}\right)^{\beta_m}} \right] $$
with $\pi_m$ being the mixing probability, $\alpha_m$ and $\beta_m$ being parameters for distribution $m$ and $x$ being some data-point we've collected.
My problem comes from evaluating the exponential term here, where I often just get 0 on my computer due to the power being very negative. I have been reading and found the 'log-sum-exponential trick' at various sources, but it is unclear to me if this is valid when we have coefficients in-front of the exponential. Is there a known numerically stable way to evaluate this, and if the log-sum-exponential trick is indeed valid, can someone show how this works with the coefficients?
Y
in my post at stats.stackexchange.com/a/485474/919: it implements a product and sum of Weibull distribution values. $\endgroup$ – whuber♦ Sep 1 '20 at 15:18