[ 
https://issues.apache.org/jira/browse/SPARK-14053?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Hyukjin Kwon updated SPARK-14053:
---------------------------------
    Labels: bulk-closed  (was: )

> Merge absTol and relTol into one in MLlib tests
> -----------------------------------------------
>
>                 Key: SPARK-14053
>                 URL: https://issues.apache.org/jira/browse/SPARK-14053
>             Project: Spark
>          Issue Type: Improvement
>          Components: ML, MLlib, Tests
>    Affects Versions: 2.0.0
>            Reporter: Xiangrui Meng
>            Assignee: Xiangrui Meng
>            Priority: Major
>              Labels: bulk-closed
>
> We have absTol and relTol in MLlib tests to compare values with possible 
> numerical differences. However, in most cases we should just use relTol. Many 
> absTol are not used properly. See 
> https://github.com/apache/spark/search?q=absTol. One corner case relTol 
> doesn't handle is when the target value is 0. We can make the following 
> change to relTol to solve the issue. Consider `x ~== y relTol t`.
> 1. If abs( y ) > eps / t, test abs(y - x) / abs( y ) < t,
> 2. else test abs(y - x) < eps
> where eps is a reasonably small value, e.g., 1e-14. Note that the transition 
> is smooth at abs( y ) = eps / t.
> cc [~dbtsai]



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to