-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-23162][PySpark][ML] Add r2adj into Python API in LinearRegressionSummary #20842
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -347,6 +347,20 @@ def r2(self): | |
| """ | ||
| 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 \ | ||
|
||
| <https://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("r2adj") | ||
|
|
||
| @property | ||
| @since("2.0.0") | ||
| def residuals(self): | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
R^2^is a scaladoc format. How about justR^2? and could you fix indef r2also(R^2 would mean XOR in python, so R**2 seems the best to me unless someone knows a better format to use with Sphinx)edit again, let's just stick with
R^2, I think it's fine here and no one would think it's XORThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure, I will change.