Sean Owen created SPARK-28604: --------------------------------- Summary: Use log1p(x) instead of log(1+x) and expm1(x) instead of exp(x)-1 Key: SPARK-28604 URL: https://issues.apache.org/jira/browse/SPARK-28604 Project: Spark Issue Type: Improvement Components: ML Affects Versions: 2.4.3 Reporter: Sean Owen Assignee: Sean Owen
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(x) 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. -- This message was sent by Atlassian JIRA (v7.6.14#76016) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org