Github user taku-k commented on a diff in the pull request:

    https://github.com/apache/spark/pull/12767#discussion_r61536791
  
    --- Diff: python/pyspark/ml/tests.py ---
    @@ -586,10 +589,13 @@ def test_fit_maximize_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(1.0, bestModelMetric, "Best model has R-squared 
of 1")
    +        self.assertEqual(len(grid), len(validationMetrics),
    --- End diff --
    
    Here, it is checked that a `validationMetrics` inside 
`TrainValidationSplitModel` is the same size as  given grid parameters.
    So, I think comparing each validationMetric in the list is not needed.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to