[ 
https://issues.apache.org/jira/browse/SPARK-17207?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15436874#comment-15436874
 ] 

Peng Meng commented on SPARK-17207:
-----------------------------------

Hi, org.apache.spark.ml.feature.CountVectorizerSuite.CountVectorizer can not 
pass this PR.
Because org.scalatest.exceptions.TestFailedException: Expected 
(2,[0,1],[1.0,1.0]) and (3,[0,1],[1.0,1.0]) to be within 1.0E-14 using absolute 
tolerance for all elements.
The size of this two vectors is not the same, so it throws exception.
Should we fix this PR or fix CountVectorizerSuite?  

> 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]

Reply via email to