{"action":"created","comment":{"url":"https://api.github.com/repos/apache/spark/pulls/comments/48058263","id":48058263,"diff_hunk":"@@ -61,7 +64,9 @@ class RegressionMetrics @Since(\"1.2.0\") (\n       case (prediction, _) => math.pow(prediction - yMean, 2)\n     }.sum()\n   }\n-\n+  private lazy val SSy = predictionAndObservations.map {","path":"mllib/src/main/scala/org/apache/spark/mllib/evaluation/RegressionMetrics.scala","position":32,"original_position":32,"commit_id":"d80ecac7f011b57a867606bdc818154ea871580d","original_commit_id":"d80ecac7f011b57a867606bdc818154ea871580d","user":{"login":"sethah","id":7275795,"avatar_url":"https://avatars.githubusercontent.com/u/7275795?v=3","gravatar_id":"","url":"https://api.github.com/users/sethah","html_url":"https://github.com/sethah","followers_url":"https://api.github.com/users/sethah/followers","following_url":"https://api.github.com/users/sethah/following{/other_user}","gists_url":"https://api.github.com/users/sethah/gists{/gist_id}","starred_url":"https://api.github.com/users/sethah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sethah/subscriptions","organizations_url":"https://api.github.com/users/sethah/orgs","repos_url":"https://api.github.com/users/sethah/repos","events_url":"https://api.github.com/users/sethah/events{/privacy}","received_events_url":"https://api.github.com/users/sethah/received_events","type":"User","site_admin":false},"body":"This should already be computed in the statistical summarizer. This can be declared like: \r\n\r\n```scala\r\nprivate lazy val SSy = math.pow(summary.normL2(0), 2)\r\n```","created_at":"2015-12-18T19:10:11Z","updated_at":"2015-12-18T19:10:11Z","html_url":"https://github.com/apache/spark/pull/10384#discussion_r48058263","pull_request_url":"https://api.github.com/repos/apache/spark/pulls/10384","_links":{"self":{"href":"https://api.github.com/repos/apache/spark/pulls/comments/48058263"},"html":{"href":"https://github.com/apache/spark/pull/10384#discussion_r48058263"},"pull_request":{"href":"https://api.github.com/repos/apache/spark/pulls/10384"}}},"pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/10384","id":54136916,"html_url":"https://github.com/apache/spark/pull/10384","diff_url":"https://github.com/apache/spark/pull/10384.diff","patch_url":"https://github.com/apache/spark/pull/10384.patch","issue_url":"https://api.github.com/repos/apache/spark/issues/10384","number":10384,"state":"open","locked":false,"title":"R^2 for regression through the origin.","user":{"login":"iyounus","id":8313847,"avatar_url":"https://avatars.githubusercontent.com/u/8313847?v=3","gravatar_id":"","url":"https://api.github.com/users/iyounus","html_url":"https://github.com/iyounus","followers_url":"https://api.github.com/users/iyounus/followers","following_url":"https://api.github.com/users/iyounus/following{/other_user}","gists_url":"https://api.github.com/users/iyounus/gists{/gist_id}","starred_url":"https://api.github.com/users/iyounus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iyounus/subscriptions","organizations_url":"https://api.github.com/users/iyounus/orgs","repos_url":"https://api.github.com/users/iyounus/repos","events_url":"https://api.github.com/users/iyounus/events{/privacy}","received_events_url":"https://api.github.com/users/iyounus/received_events","type":"User","site_admin":false},"body":"Modified the definition of R^2 for regression through origin. Added modified test for regression metrics.\r\n","created_at":"2015-12-18T18:56:50Z","updated_at":"2015-12-18T19:10:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"94b4ea6e63a5b03a5d940576f0f14fb9f12dedb5","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/apache/spark/pulls/10384/commits","review_comments_url":"https://api.github.com/repos/apache/spark/pulls/10384/comments","review_comment_url":"https://api.github.com/repos/apache/spark/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/spark/issues/10384/comments","statuses_url":"https://api.github.com/repos/apache/spark/statuses/d80ecac7f011b57a867606bdc818154ea871580d","head":{"label":"iyounus:SPARK_12331_R2_for_regression_through_origin","ref":"SPARK_12331_R2_for_regression_through_origin","sha":"d80ecac7f011b57a867606bdc818154ea871580d","user":{"login":"iyounus","id":8313847,"avatar_url":"https://avatars.githubusercontent.com/u/8313847?v=3","gravatar_id":"","url":"https://api.github.com/users/iyounus","html_url":"https://github.com/iyounus","followers_url":"https://api.github.com/users/iyounus/followers","following_url":"https://api.github.com/users/iyounus/following{/other_user}","gists_url":"https://api.github.com/users/iyounus/gists{/gist_id}","starred_url":"https://api.github.com/users/iyounus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iyounus/subscriptions","organizations_url":"https://api.github.com/users/iyounus/orgs","repos_url":"https://api.github.com/users/iyounus/repos","events_url":"https://api.github.com/users/iyounus/events{/privacy}","received_events_url":"https://api.github.com/users/iyounus/received_events","type":"User","site_admin":false},"repo":{"id":45699887,"name":"spark","full_name":"iyounus/spark","owner":{"login":"iyounus","id":8313847,"avatar_url":"https://avatars.githubusercontent.com/u/8313847?v=3","gravatar_id":"","url":"https://api.github.com/users/iyounus","html_url":"https://github.com/iyounus","followers_url":"https://api.github.com/users/iyounus/followers","following_url":"https://api.github.com/users/iyounus/following{/other_user}","gists_url":"https://api.github.com/users/iyounus/gists{/gist_id}","starred_url":"https://api.github.com/users/iyounus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iyounus/subscriptions","organizations_url":"https://api.github.com/users/iyounus/orgs","repos_url":"https://api.github.com/users/iyounus/repos","events_url":"https://api.github.com/users/iyounus/events{/privacy}","received_events_url":"https://api.github.com/users/iyounus/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/iyounus/spark","description":"Mirror of Apache Spark","fork":true,"url":"https://api.github.com/repos/iyounus/spark","forks_url":"https://api.github.com/repos/iyounus/spark/forks","keys_url":"https://api.github.com/repos/iyounus/spark/keys{/key_id}","collaborators_url":"https://api.github.com/repos/iyounus/spark/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/iyounus/spark/teams","hooks_url":"https://api.github.com/repos/iyounus/spark/hooks","issue_events_url":"https://api.github.com/repos/iyounus/spark/issues/events{/number}","events_url":"https://api.github.com/repos/iyounus/spark/events","assignees_url":"https://api.github.com/repos/iyounus/spark/assignees{/user}","branches_url":"https://api.github.com/repos/iyounus/spark/branches{/branch}","tags_url":"https://api.github.com/repos/iyounus/spark/tags","blobs_url":"https://api.github.com/repos/iyounus/spark/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/iyounus/spark/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/iyounus/spark/git/refs{/sha}","trees_url":"https://api.github.com/repos/iyounus/spark/git/trees{/sha}","statuses_url":"https://api.github.com/repos/iyounus/spark/statuses/{sha}","languages_url":"https://api.github.com/repos/iyounus/spark/languages","stargazers_url":"https://api.github.com/repos/iyounus/spark/stargazers","contributors_url":"https://api.github.com/repos/iyounus/spark/contributors","subscribers_url":"https://api.github.com/repos/iyounus/spark/subscribers","subscription_url":"https://api.github.com/repos/iyounus/spark/subscription","commits_url":"https://api.github.com/repos/iyounus/spark/commits{/sha}","git_commits_url":"https://api.github.com/repos/iyounus/spark/git/commits{/sha}","comments_url":"https://api.github.com/repos/iyounus/spark/comments{/number}","issue_comment_url":"https://api.github.com/repos/iyounus/spark/issues/comments{/number}","contents_url":"https://api.github.com/repos/iyounus/spark/contents/{+path}","compare_url":"https://api.github.com/repos/iyounus/spark/compare/{base}...{head}","merges_url":"https://api.github.com/repos/iyounus/spark/merges","archive_url":"https://api.github.com/repos/iyounus/spark/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/iyounus/spark/downloads","issues_url":"https://api.github.com/repos/iyounus/spark/issues{/number}","pulls_url":"https://api.github.com/repos/iyounus/spark/pulls{/number}","milestones_url":"https://api.github.com/repos/iyounus/spark/milestones{/number}","notifications_url":"https://api.github.com/repos/iyounus/spark/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/iyounus/spark/labels{/name}","releases_url":"https://api.github.com/repos/iyounus/spark/releases{/id}","created_at":"2015-11-06T18:33:46Z","updated_at":"2015-11-06T18:34:18Z","pushed_at":"2015-12-18T18:55:21Z","git_url":"git://github.com/iyounus/spark.git","ssh_url":"git@github.com:iyounus/spark.git","clone_url":"https://github.com/iyounus/spark.git","svn_url":"https://github.com/iyounus/spark","homepage":null,"size":136224,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"apache:master","ref":"master","sha":"41ee7c57abd9f52065fd7ffb71a8af229603371d","user":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"repo":{"id":17165658,"name":"spark","full_name":"apache/spark","owner":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apache/spark","description":"Mirror of Apache Spark","fork":false,"url":"https://api.github.com/repos/apache/spark","forks_url":"https://api.github.com/repos/apache/spark/forks","keys_url":"https://api.github.com/repos/apache/spark/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/spark/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/spark/teams","hooks_url":"https://api.github.com/repos/apache/spark/hooks","issue_events_url":"https://api.github.com/repos/apache/spark/issues/events{/number}","events_url":"https://api.github.com/repos/apache/spark/events","assignees_url":"https://api.github.com/repos/apache/spark/assignees{/user}","branches_url":"https://api.github.com/repos/apache/spark/branches{/branch}","tags_url":"https://api.github.com/repos/apache/spark/tags","blobs_url":"https://api.github.com/repos/apache/spark/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/spark/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/spark/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/spark/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/spark/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/spark/languages","stargazers_url":"https://api.github.com/repos/apache/spark/stargazers","contributors_url":"https://api.github.com/repos/apache/spark/contributors","subscribers_url":"https://api.github.com/repos/apache/spark/subscribers","subscription_url":"https://api.github.com/repos/apache/spark/subscription","commits_url":"https://api.github.com/repos/apache/spark/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/spark/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/spark/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/spark/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/spark/contents/{+path}","compare_url":"https://api.github.com/repos/apache/spark/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/spark/merges","archive_url":"https://api.github.com/repos/apache/spark/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/spark/downloads","issues_url":"https://api.github.com/repos/apache/spark/issues{/number}","pulls_url":"https://api.github.com/repos/apache/spark/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/spark/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/spark/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/spark/labels{/name}","releases_url":"https://api.github.com/repos/apache/spark/releases{/id}","created_at":"2014-02-25T08:00:08Z","updated_at":"2015-12-18T15:40:49Z","pushed_at":"2015-12-18T19:07:32Z","git_url":"git://github.com/apache/spark.git","ssh_url":"git@github.com:apache/spark.git","clone_url":"https://github.com/apache/spark.git","svn_url":"https://github.com/apache/spark","homepage":null,"size":398234,"stargazers_count":6630,"watchers_count":6630,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":6136,"mirror_url":"git://git.apache.org/spark.git","open_issues_count":378,"forks":6136,"open_issues":378,"watchers":6630,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/spark/pulls/10384"},"html":{"href":"https://github.com/apache/spark/pull/10384"},"issue":{"href":"https://api.github.com/repos/apache/spark/issues/10384"},"comments":{"href":"https://api.github.com/repos/apache/spark/issues/10384/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/spark/pulls/10384/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/spark/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/spark/pulls/10384/commits"},"statuses":{"href":"https://api.github.com/repos/apache/spark/statuses/d80ecac7f011b57a867606bdc818154ea871580d"}}}}