spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sethah <...@git.apache.org>
Subject [GitHub] spark pull request: [SPARK-14978][PySpark] PySpark TrainValidation...
Date Wed, 11 May 2016 22:51:15 GMT
Github user sethah commented on a diff in the pull request:

    https://github.com/apache/spark/pull/12767#discussion_r62940610
  
    --- Diff: python/pyspark/ml/tests.py ---
    @@ -590,10 +590,14 @@ def test_fit_minimize_metric(self):
             tvsModel = tvs.fit(dataset)
             bestModel = tvsModel.bestModel
             bestModelMetric = evaluator.evaluate(bestModel.transform(dataset))
    +        validationMetrics = tvsModel.validationMetrics
     
             self.assertEqual(0.0, bestModel.getOrDefault('inducedError'),
                              "Best model should have zero induced error")
             self.assertEqual(0.0, bestModelMetric, "Best model has RMSE of 0")
    +        self.assertEqual(len(grid), len(validationMetrics),
    +                         "validationMetrics has the same size of grid parameter")
    +        self.assertIn(bestModelMetric, validationMetrics)
    --- End diff --
    
    `self.assertEqual(bestModelMetric, max(validationMetrics))`? It's more explicit IMO.


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