spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mengxr <...@git.apache.org>
Subject [GitHub] spark pull request: [SPARK-8700][ML] Disable feature scaling in Lo...
Date Wed, 08 Jul 2015 20:36:08 GMT
Github user mengxr commented on a diff in the pull request:

    https://github.com/apache/spark/pull/7080#discussion_r34195242
  
    --- Diff: mllib/src/test/scala/org/apache/spark/ml/classification/LogisticRegressionSuite.scala
---
    @@ -232,16 +236,26 @@ class LogisticRegressionSuite extends SparkFunSuite with MLlibTestSparkContext
{
         val interceptR = 2.8366423
         val weightsR = Array(-0.5895848, 0.8931147, -0.3925051, -0.7996864)
     
    -    assert(model.intercept ~== interceptR relTol 1E-3)
    -    assert(model.weights(0) ~== weightsR(0) relTol 1E-3)
    -    assert(model.weights(1) ~== weightsR(1) relTol 1E-3)
    -    assert(model.weights(2) ~== weightsR(2) relTol 1E-3)
    -    assert(model.weights(3) ~== weightsR(3) relTol 1E-3)
    +    assert(model1.intercept ~== interceptR relTol 1E-3)
    +    assert(model1.weights(0) ~== weightsR(0) relTol 1E-3)
    --- End diff --
    
    For the tests, it might be simpler to make `weightR` a `DenseVector` then use assert(model1.weights
~== weightsR relTol ...)`.


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


Mime
View raw message