{"action":"created","comment":{"url":"https://api.github.com/repos/apache/spark/pulls/comments/73256998","id":73256998,"diff_hunk":"@@ -234,7 +234,7 @@ def _fit(self, dataset):\n                 model = est.fit(train, epm[j])\n                 # TODO: duplicate evaluator to take extra params from input\n                 metric = eva.evaluate(model.transform(validation, epm[j]))\n-                metrics[j] += metric\n+                metrics[j] += metric/nFolds","path":"python/pyspark/ml/tuning.py","position":5,"original_position":5,"commit_id":"e253be5e2154cf824f4d5429335f7f571a8dc621","original_commit_id":"e253be5e2154cf824f4d5429335f7f571a8dc621","user":{"login":"srowen","id":822522,"avatar_url":"https://avatars.githubusercontent.com/u/822522?v=3","gravatar_id":"","url":"https://api.github.com/users/srowen","html_url":"https://github.com/srowen","followers_url":"https://api.github.com/users/srowen/followers","following_url":"https://api.github.com/users/srowen/following{/other_user}","gists_url":"https://api.github.com/users/srowen/gists{/gist_id}","starred_url":"https://api.github.com/users/srowen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/srowen/subscriptions","organizations_url":"https://api.github.com/users/srowen/orgs","repos_url":"https://api.github.com/users/srowen/repos","events_url":"https://api.github.com/users/srowen/events{/privacy}","received_events_url":"https://api.github.com/users/srowen/received_events","type":"User","site_admin":false},"body":"OK looks fine actually. Would it be possible to add a little bit to the test above this to demonstrate that the result is correct now? just testing the value of the first element of metrics for example.","created_at":"2016-08-02T23:26:43Z","updated_at":"2016-08-02T23:26:43Z","html_url":"https://github.com/apache/spark/pull/14456#discussion_r73256998","pull_request_url":"https://api.github.com/repos/apache/spark/pulls/14456","_links":{"self":{"href":"https://api.github.com/repos/apache/spark/pulls/comments/73256998"},"html":{"href":"https://github.com/apache/spark/pull/14456#discussion_r73256998"},"pull_request":{"href":"https://api.github.com/repos/apache/spark/pulls/14456"}}},"pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/14456","id":79691999,"html_url":"https://github.com/apache/spark/pull/14456","diff_url":"https://github.com/apache/spark/pull/14456.diff","patch_url":"https://github.com/apache/spark/pull/14456.patch","issue_url":"https://api.github.com/repos/apache/spark/issues/14456","number":14456,"state":"open","locked":false,"title":"[SPARK-16831] [Python] Fixed bug in CrossValidator.avgMetrics","user":{"login":"pkch","id":1593648,"avatar_url":"https://avatars.githubusercontent.com/u/1593648?v=3","gravatar_id":"","url":"https://api.github.com/users/pkch","html_url":"https://github.com/pkch","followers_url":"https://api.github.com/users/pkch/followers","following_url":"https://api.github.com/users/pkch/following{/other_user}","gists_url":"https://api.github.com/users/pkch/gists{/gist_id}","starred_url":"https://api.github.com/users/pkch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pkch/subscriptions","organizations_url":"https://api.github.com/users/pkch/orgs","repos_url":"https://api.github.com/users/pkch/repos","events_url":"https://api.github.com/users/pkch/events{/privacy}","received_events_url":"https://api.github.com/users/pkch/received_events","type":"User","site_admin":false},"body":"## What changes were proposed in this pull request?\r\n\r\navgMetrics was summed, not averaged, across folds \r\n\r\n","created_at":"2016-08-02T08:05:33Z","updated_at":"2016-08-02T23:26:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f86c850130741bb4a91b8ab5c4b9753c4f8a701c","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/apache/spark/pulls/14456/commits","review_comments_url":"https://api.github.com/repos/apache/spark/pulls/14456/comments","review_comment_url":"https://api.github.com/repos/apache/spark/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/spark/issues/14456/comments","statuses_url":"https://api.github.com/repos/apache/spark/statuses/e253be5e2154cf824f4d5429335f7f571a8dc621","head":{"label":"pkch:pkch-patch-1","ref":"pkch-patch-1","sha":"e253be5e2154cf824f4d5429335f7f571a8dc621","user":{"login":"pkch","id":1593648,"avatar_url":"https://avatars.githubusercontent.com/u/1593648?v=3","gravatar_id":"","url":"https://api.github.com/users/pkch","html_url":"https://github.com/pkch","followers_url":"https://api.github.com/users/pkch/followers","following_url":"https://api.github.com/users/pkch/following{/other_user}","gists_url":"https://api.github.com/users/pkch/gists{/gist_id}","starred_url":"https://api.github.com/users/pkch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pkch/subscriptions","organizations_url":"https://api.github.com/users/pkch/orgs","repos_url":"https://api.github.com/users/pkch/repos","events_url":"https://api.github.com/users/pkch/events{/privacy}","received_events_url":"https://api.github.com/users/pkch/received_events","type":"User","site_admin":false},"repo":{"id":64708457,"name":"spark","full_name":"pkch/spark","owner":{"login":"pkch","id":1593648,"avatar_url":"https://avatars.githubusercontent.com/u/1593648?v=3","gravatar_id":"","url":"https://api.github.com/users/pkch","html_url":"https://github.com/pkch","followers_url":"https://api.github.com/users/pkch/followers","following_url":"https://api.github.com/users/pkch/following{/other_user}","gists_url":"https://api.github.com/users/pkch/gists{/gist_id}","starred_url":"https://api.github.com/users/pkch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pkch/subscriptions","organizations_url":"https://api.github.com/users/pkch/orgs","repos_url":"https://api.github.com/users/pkch/repos","events_url":"https://api.github.com/users/pkch/events{/privacy}","received_events_url":"https://api.github.com/users/pkch/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pkch/spark","description":"Mirror of Apache Spark","fork":true,"url":"https://api.github.com/repos/pkch/spark","forks_url":"https://api.github.com/repos/pkch/spark/forks","keys_url":"https://api.github.com/repos/pkch/spark/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pkch/spark/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pkch/spark/teams","hooks_url":"https://api.github.com/repos/pkch/spark/hooks","issue_events_url":"https://api.github.com/repos/pkch/spark/issues/events{/number}","events_url":"https://api.github.com/repos/pkch/spark/events","assignees_url":"https://api.github.com/repos/pkch/spark/assignees{/user}","branches_url":"https://api.github.com/repos/pkch/spark/branches{/branch}","tags_url":"https://api.github.com/repos/pkch/spark/tags","blobs_url":"https://api.github.com/repos/pkch/spark/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pkch/spark/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pkch/spark/git/refs{/sha}","trees_url":"https://api.github.com/repos/pkch/spark/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pkch/spark/statuses/{sha}","languages_url":"https://api.github.com/repos/pkch/spark/languages","stargazers_url":"https://api.github.com/repos/pkch/spark/stargazers","contributors_url":"https://api.github.com/repos/pkch/spark/contributors","subscribers_url":"https://api.github.com/repos/pkch/spark/subscribers","subscription_url":"https://api.github.com/repos/pkch/spark/subscription","commits_url":"https://api.github.com/repos/pkch/spark/commits{/sha}","git_commits_url":"https://api.github.com/repos/pkch/spark/git/commits{/sha}","comments_url":"https://api.github.com/repos/pkch/spark/comments{/number}","issue_comment_url":"https://api.github.com/repos/pkch/spark/issues/comments{/number}","contents_url":"https://api.github.com/repos/pkch/spark/contents/{+path}","compare_url":"https://api.github.com/repos/pkch/spark/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pkch/spark/merges","archive_url":"https://api.github.com/repos/pkch/spark/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pkch/spark/downloads","issues_url":"https://api.github.com/repos/pkch/spark/issues{/number}","pulls_url":"https://api.github.com/repos/pkch/spark/pulls{/number}","milestones_url":"https://api.github.com/repos/pkch/spark/milestones{/number}","notifications_url":"https://api.github.com/repos/pkch/spark/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pkch/spark/labels{/name}","releases_url":"https://api.github.com/repos/pkch/spark/releases{/id}","deployments_url":"https://api.github.com/repos/pkch/spark/deployments","created_at":"2016-08-01T23:29:16Z","updated_at":"2016-08-01T23:29:38Z","pushed_at":"2016-08-02T07:57:54Z","git_url":"git://github.com/pkch/spark.git","ssh_url":"git@github.com:pkch/spark.git","clone_url":"https://github.com/pkch/spark.git","svn_url":"https://github.com/pkch/spark","homepage":null,"size":177079,"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":"10e1c0e638774f5d746771b6dd251de2480f94eb","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}","deployments_url":"https://api.github.com/repos/apache/spark/deployments","created_at":"2014-02-25T08:00:08Z","updated_at":"2016-08-02T20:49:13Z","pushed_at":"2016-08-02T23:14:37Z","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":506529,"stargazers_count":9521,"watchers_count":9521,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":8833,"mirror_url":"git://git.apache.org/spark.git","open_issues_count":464,"forks":8833,"open_issues":464,"watchers":9521,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/spark/pulls/14456"},"html":{"href":"https://github.com/apache/spark/pull/14456"},"issue":{"href":"https://api.github.com/repos/apache/spark/issues/14456"},"comments":{"href":"https://api.github.com/repos/apache/spark/issues/14456/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/spark/pulls/14456/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/spark/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/spark/pulls/14456/commits"},"statuses":{"href":"https://api.github.com/repos/apache/spark/statuses/e253be5e2154cf824f4d5429335f7f571a8dc621"}}}}
{"actor":{"display_login":"srowen"}}