You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by jkbradley <gi...@git.apache.org> on 2017/03/01 00:03:40 UTC

[GitHub] spark pull request #16784: [SPARK-19382][ML]:Test sparse vectors in LinearSV...

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

    https://github.com/apache/spark/pull/16784#discussion_r103582526
  
    --- Diff: mllib/src/test/scala/org/apache/spark/ml/classification/LinearSVCSuite.scala ---
    @@ -68,13 +77,21 @@ class LinearSVCSuite extends SparkFunSuite with MLlibTestSparkContext with Defau
         val model = svm.fit(smallBinaryDataset)
         assert(model.transform(smallValidationDataset)
           .where("prediction=label").count() > nPoints * 0.8)
    +    val sparseModel = svm.fit(smallSparseBinaryDataset)
    +    assert(sparseModel.transform(smallSparseValidationDataset)
    +      .where("prediction=label").count() > nPoints * 0.8)
    +    checkModels(model, sparseModel)
       }
     
       test("Linear SVC binary classification with regularization") {
         val svm = new LinearSVC()
         val model = svm.setRegParam(0.1).fit(smallBinaryDataset)
         assert(model.transform(smallValidationDataset)
           .where("prediction=label").count() > nPoints * 0.8)
    +    val sparseModel = svm.fit(smallSparseBinaryDataset)
    +    assert(sparseModel.transform(smallSparseValidationDataset)
    --- End diff --
    
    same here


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org