Github user smurching commented on a diff in the pull request:

    https://github.com/apache/spark/pull/19381#discussion_r148709163
  
    --- Diff: 
mllib/src/test/scala/org/apache/spark/ml/classification/LinearSVCSuite.scala ---
    @@ -202,6 +202,15 @@ class LinearSVCSuite extends SparkFunSuite with 
MLlibTestSparkContext with Defau
           dataset.as[LabeledPoint], estimator, modelEquals, 42L)
       }
     
    +  test("prediction on single instance") {
    +    val trainer = new LinearSVC()
    +    val model = trainer.fit(smallBinaryDataset)
    +    model.transform(smallBinaryDataset).select("features", 
"prediction").collect().foreach {
    +      case Row(features: Vector, prediction: Double) =>
    +        assert(prediction ~== model.predict(features) relTol 1E-5)
    --- End diff --
    
    Could you please check for exact equality here (& in other tests)?


---

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

Reply via email to