spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sean Owen (JIRA)" <j...@apache.org>
Subject [jira] [Created] (SPARK-28604) Use log1p(x) instead of log(1+x) and expm1(x) instead of exp(x)-1
Date Fri, 02 Aug 2019 16:27:00 GMT
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-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org


Mime
View raw message