Uh oh!
There was an error while loading. Please reload this page.
[SPARK-23162][PySpark][ML] Add r2adj into Python API in LinearRegressionSummary - #20842
[SPARK-23162][PySpark][ML] Add r2adj into Python API in LinearRegressionSummary#20842kevinyu98 wants to merge 3 commits into
Conversation
BryanCutler
commented
Mar 21, 2018
ok to test |
SparkQA
commented
Mar 21, 2018
Test build #88492 has finished for PR 20842 at commit
|
BryanCutler
left a comment
There was a problem hiding this comment.
Thanks @kevinyu98! Looks mostly good, just some small doc formatting issues
| @since("2.4.0") | ||
| def r2adj(self): | ||
| """ | ||
| Returns Adjusted R^2^, the adjusted coefficient of determination. |
There was a problem hiding this comment.
R^2^ is a scaladoc format. How about just R^2? and could you fix in def r2 also
(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 XOR
| Returns Adjusted R^2^, the adjusted coefficient of determination. | ||
| .. seealso:: `Wikipedia coefficient of determination \ | ||
| <https://en.wikipedia.org/wiki/Coefficient_of_determination>` |
There was a problem hiding this comment.
use the same link from the scaladoc https://en.wikipedia.org/wiki/Coefficient_of_determination#Adjusted_R2
It also doesn't generate properly, you need a trailing _ I believe (also need to fix def r2 if you don't mind).
it should be:
.. seealso:: `Wikipedia coefficient of determination \
<http://en.wikipedia.org/wiki/Coefficient_of_determination#Adjusted_R2>`_
If you are able to, building the docs to check these is a good idea
SparkQA
commented
Mar 24, 2018
Test build #88556 has finished for PR 20842 at commit
|
tengpeng
commented
Mar 25, 2018
Looks good! Thanks! |
@tengpeng Thanks a lot.Not sure the Python style test fail is related to my latest code change in regression.py or not. |
| """ | ||
| Returns Adjusted R^2, the adjusted coefficient of determination. | ||
| .. seealso:: `Wikipedia coefficient of determination \ |
There was a problem hiding this comment.
It looks like the error was because the link name is the same as above, maybe try Wikipedia coefficient of determination, Adjusted R^2
SparkQA
commented
Mar 26, 2018
Test build #88597 has finished for PR 20842 at commit
|
BryanCutler
commented
Mar 26, 2018
merged to master, thanks @kevinyu98 ! |
…ionSummary ## What changes were proposed in this pull request? Adding r2adj in LinearRegressionSummary for Python API. ## How was this patch tested? Added unit tests to exercise the api calls for the summary classes in tests.py. Author: Kevin Yu <qyu@us.ibm.com> Closesapache#20842 from kevinyu98/spark-23162.
What changes were proposed in this pull request?
Adding r2adj in LinearRegressionSummary for Python API.
How was this patch tested?
Added unit tests to exercise the api calls for the summary classes in tests.py.