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

    https://github.com/apache/spark/pull/9180#discussion_r43481002
  
    --- Diff: 
mllib/src/test/scala/org/apache/spark/ml/regression/LinearRegressionSuite.scala 
---
    @@ -49,16 +50,29 @@ class LinearRegressionSuite extends SparkFunSuite with 
MLlibTestSparkContext {
        */
       override def beforeAll(): Unit = {
         super.beforeAll()
    -    dataset = sqlContext.createDataFrame(
    +    datasetWithDenseFeature = sqlContext.createDataFrame(
           sc.parallelize(LinearDataGenerator.generateLinearInput(
    -        6.3, Array(4.7, 7.2), Array(0.9, -1.3), Array(0.7, 1.2), 10000, 
seed, 0.1), 2))
    +        intercept = 6.3, weights = Array(4.7, 7.2), xMean = Array(0.9, 
-1.3),
    +        xVariance = Array(0.7, 1.2), nPoints = 10000, seed = seed, eps = 
0.1), 2))
         /*
            datasetWithoutIntercept is not needed for correctness testing but 
is useful for illustrating
            training model without intercept
          */
    -    datasetWithoutIntercept = sqlContext.createDataFrame(
    +    datasetWithDenseFeatureWithoutIntercept = sqlContext.createDataFrame(
           sc.parallelize(LinearDataGenerator.generateLinearInput(
    -        0.0, Array(4.7, 7.2), Array(0.9, -1.3), Array(0.7, 1.2), 10000, 
seed, 0.1), 2))
    +        intercept = 0.0, weights = Array(4.7, 7.2), xMean = Array(0.9, 
-1.3),
    +        xVariance = Array(0.7, 1.2), nPoints = 10000, seed = seed, eps = 
0.1), 2))
    --- End diff --
    
    ditto


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

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

Reply via email to