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

    https://github.com/apache/spark/pull/10384#discussion_r48209708
  
    --- Diff: 
mllib/src/main/scala/org/apache/spark/mllib/evaluation/RegressionMetrics.scala 
---
    @@ -105,6 +112,14 @@ class RegressionMetrics @Since("1.2.0") (
        */
       @Since("1.2.0")
       def r2: Double = {
    -    1 - SSerr / SStot
    +    // In case of regression through the origin (biased case), the 
definition of R^2 is
    +    // to be modified. Here is a review paper which explains why:
    +    // J. G. Eisenhauer, Regression through the Origin. Teaching 
Statistics 25, 76–80 (2003)
    +    // 
https://online.stat.psu.edu/~ajw13/stat501/SpecialTopics/Reg_thru_origin.pdf
    --- End diff --
    
    OK, I think I didn't understand your comment before. I'll move this note to 
scaladoc.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to