spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sethah <>
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:
    --- Diff: python/pyspark/ml/ ---
    @@ -590,10 +590,14 @@ def test_fit_minimize_metric(self):
             tvsModel =
             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 or file a JIRA ticket
with INFRA.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message