zhengruifeng commented on code in PR #49620:
URL: https://github.com/apache/spark/pull/49620#discussion_r1926597063


##########
python/pyspark/ml/evaluation.py:
##########
@@ -467,6 +470,11 @@ def setParams(
         kwargs = self._input_kwargs
         return self._set(**kwargs)
 
+    def isLargerBetter(self) -> bool:
+        if self.getMetricName() in ["r2", "var"]:
+            return True
+        return False

Review Comment:
   ```suggestion
           return self.getMetricName() in ["r2", "var"]
   ```
   
   we can simplify it a bit



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to