[
https://issues.apache.org/jira/browse/SPARK-17207?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15437004#comment-15437004
]
Sean Owen commented on SPARK-17207:
-----------------------------------
I think vectors of different dimensions can never be nearly-equal. In the first
case, there is no third dimension to compare on, because one lacks a third
dimension at all; it's not implicitly 0, not even in the sparse case if the
dimension is < 3. Yes, both should be false.
Yes, in the second part of that test case, it expects counts over just two
words, but the expected output is still of dimension 3. I think you just make
the dimension 2 in each of the sparse vectors.
> Comparing Vector in relative tolerance or absolute tolerance in UnitTests
> error
> --------------------------------------------------------------------------------
>
> Key: SPARK-17207
> URL: https://issues.apache.org/jira/browse/SPARK-17207
> Project: Spark
> Issue Type: Bug
> Components: ML, MLlib
> Reporter: Peng Meng
>
> The result of compare two vectors using UnitTests
> (org.apache.spark.mllib.util.TestingUtils) is not right sometime.
> For example:
> val a = Vectors.dense(Arrary(1.0, 2.0))
> val b = Vectors.zeros(0)
> a ~== b absTol 1e-1 // the result is true.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]