Description
Following https://issues.apache.org/jira/browse/SPARK-28519, I noticed that there are number of places in the MLlib code that may be, for example, computing log(1+x) where x is very small. All math libraries specialize for this case with log1p for better accuracy. Same for expm1. It shouldn't hurt to use log1p/expm1 where possible and in a few cases I think it will improve accuracy, as sometimes x is for example a very small probability.
Attachments
Issue Links
- links to