Github user kevinyu98 commented on a diff in the pull request:
https://github.com/apache/spark/pull/20842#discussion_r177187425
--- Diff: python/pyspark/ml/regression.py ---
@@ -336,17 +336,31 @@ def rootMeanSquaredError(self):
@since("2.0.0")
def r2(self):
"""
- Returns R^2^, the coefficient of determination.
+ Returns R^2, the coefficient of determination.
.. seealso:: `Wikipedia coefficient of determination \
- <http://en.wikipedia.org/wiki/Coefficient_of_determination>`
+ <http://en.wikipedia.org/wiki/Coefficient_of_determination>`_
.. note:: This ignores instance weights (setting all to 1.0) from
`LinearRegression.weightCol`. This will change in later Spark
versions.
"""
return self._call_java("r2")
+ @property
+ @since("2.4.0")
+ def r2adj(self):
+ """
+ Returns Adjusted R^2, the adjusted coefficient of determination.
+
+ .. seealso:: `Wikipedia coefficient of determination \
--- End diff --
ok, thanks.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]