RubixML / ML

A high-level machine learning and deep learning library for the PHP language.
https://rubixml.com
MIT License
2.03k stars 182 forks source link

Possible Numerical Instability in Gaussian Mixture #1

Closed andrewdalpino closed 5 years ago

andrewdalpino commented 5 years ago

The current implementation of Gaussian Mixture clusterer uses probabilities directly instead of taking the log as is a convention used in other Gaussian/probability-based estimators in Rubix. When computing probabilities, numerical instability issues arise when such probabilities are very high or (more commonly) very low. By entering log space, we push the precision of the floating point number from the exponent to the mantissa, which has more precision and therefore avoids numerical under/overflows.

andrewdalpino commented 5 years ago

Improved numerical stability with log probabilities