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

    https://github.com/apache/spark/pull/12577#discussion_r60655544
  
    --- Diff: python/pyspark/ml/evaluation.py ---
    @@ -187,6 +187,13 @@ class RegressionEvaluator(JavaEvaluator, HasLabelCol, 
HasPredictionCol):
         0.993...
         >>> evaluator.evaluate(dataset, {evaluator.metricName: "mae"})
         2.649...
    +    >>> scoreAndLabels = [(4.0, 5.0), (4.0, 1.0), (float('nan'), 2.0),
    +    ...   (1.0, 3.0), (float('nan'), 4.0)]
    +    >>> dataset = sqlContext.createDataFrame(scoreAndLabels, ["raw", 
"label"])
    +    ...
    +    >>> evaluator = 
RegressionEvaluator(predictionCol="raw").setDropNaN(True)
    +    >>> evaluator.evaluate(dataset)
    --- End diff --
    
    This doesn't quite mirror the Scala test, since the scala test first checks 
that the result is `NaN` when `dropNaN` is true. Shall we do the same check 
here?


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