[
https://issues.apache.org/jira/browse/SPARK-2599?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14069052#comment-14069052
]
Doris Xin commented on SPARK-2599:
----------------------------------
Did some digging through the codebase, and it seems like
DoubleWithAlmostEquals.almostEquals itself isn't used anywhere but
VectorWithAlmostEquals.almostEquals, which calls
DoubleWithAlmostEquals.almostEquals, is exclusively used in one test suite
MultivariateOnlineSummarizerSuite (by the same author). Not polluting the
current implementation with absolute error is probably the safest thing to do,
but naming then becomes an issue. We need something succinct and self
explanatory for these test utils, and something like almostEqualsAbs/Rel might
be too verbose?
Either way, it'd be nice to have a centralized set of test utils soon.
> almostEquals mllib.util.TestingUtils does not behave as expected when
> comparing against 0.0
> -------------------------------------------------------------------------------------------
>
> Key: SPARK-2599
> URL: https://issues.apache.org/jira/browse/SPARK-2599
> Project: Spark
> Issue Type: Bug
> Components: MLlib
> Reporter: Doris Xin
> Priority: Minor
>
> DoubleWithAlmostEquals.almostEquals, when used to compare a number with 0.0,
> would always produce an epsilon of 1 >> 1e-10, causing false failure when
> comparing very small numbers with 0.0.
--
This message was sent by Atlassian JIRA
(v6.2#6252)