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-8265] [MLlib] [PySpark] Add LinearDataG...
Date Thu, 18 Jun 2015 22:23:30 GMT
Github user mengxr commented on a diff in the pull request:

    https://github.com/apache/spark/pull/6715#discussion_r32785372
  
    --- Diff: python/pyspark/mllib/tests.py ---
    @@ -863,6 +863,22 @@ def test_model_transform(self):
                 eprod.transform(sparsevec), SparseVector(3, [0], [3]))
     
     
    +class LinearDataGeneratorTests(MLlibTestCase):
    +    def test_dim(self):
    +        points = LinearDataGenerator.generateLinearInput(
    +            0.0, [0.0, 0.0, 0.0], [0.0, 0.0, 0.0],
    +            [0.33, 0.33, 0.33], 4, 0, 0.1)
    +        self.assertEqual(len(points), 4)
    +        for point in points:
    +            self.assertEqual(len(point.features), 3)
    +
    +        rdd = LinearDataGenerator.generateLinearRDD(
    +            sc, 6, 2, 0.1, 2, 0.0).collect()
    --- End diff --
    
    Sam here. Use named arguments. The variable name `rdd` is confusing because this is already
collected to driver.


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