{"action":"created","comment":{"url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/comments/65850867","id":65850867,"diff_hunk":"@@ -591,71 +552,212 @@ def test_param_sampler():\n         assert_equal([x for x in sampler], [x for x in sampler])\n \n \n-def test_randomized_search_grid_scores():\n+def check_results_array_types(results, param_keys, score_keys):\n+    # Check if the search results' array are of correct types\n+    assert_true(all(isinstance(results[param], np.ma.MaskedArray)\n+                    for param in param_keys))\n+    assert_true(all(results[key].dtype is np.dtype('O')\n+                    for key in param_keys))\n+    assert_false(any(isinstance(results[key], np.ma.MaskedArray)\n+                     for key in score_keys))\n+    assert_true(all(results[key].dtype is np.dtype('float64')\n+                    for key in score_keys if key != 'test_rank_score'))","path":"sklearn/model_selection/tests/test_search.py","position":170,"original_position":170,"commit_id":"568ba7c10d9f7ea03629cf621894b66cc814c8d1","original_commit_id":"568ba7c10d9f7ea03629cf621894b66cc814c8d1","user":{"login":"ogrisel","id":89061,"avatar_url":"https://avatars.githubusercontent.com/u/89061?v=3","gravatar_id":"","url":"https://api.github.com/users/ogrisel","html_url":"https://github.com/ogrisel","followers_url":"https://api.github.com/users/ogrisel/followers","following_url":"https://api.github.com/users/ogrisel/following{/other_user}","gists_url":"https://api.github.com/users/ogrisel/gists{/gist_id}","starred_url":"https://api.github.com/users/ogrisel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ogrisel/subscriptions","organizations_url":"https://api.github.com/users/ogrisel/orgs","repos_url":"https://api.github.com/users/ogrisel/repos","events_url":"https://api.github.com/users/ogrisel/events{/privacy}","received_events_url":"https://api.github.com/users/ogrisel/received_events","type":"User","site_admin":false},"body":"Please use `results[key].dtype == np.float64` instead of relying on the physical equality and dtype interning tricks.","created_at":"2016-06-06T08:08:42Z","updated_at":"2016-06-06T08:08:42Z","html_url":"https://github.com/scikit-learn/scikit-learn/pull/6697#discussion_r65850867","pull_request_url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/6697","_links":{"self":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/comments/65850867"},"html":{"href":"https://github.com/scikit-learn/scikit-learn/pull/6697#discussion_r65850867"},"pull_request":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/6697"}}},"pull_request":{"url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/6697","id":67549035,"html_url":"https://github.com/scikit-learn/scikit-learn/pull/6697","diff_url":"https://github.com/scikit-learn/scikit-learn/pull/6697.diff","patch_url":"https://github.com/scikit-learn/scikit-learn/pull/6697.patch","issue_url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/6697","number":6697,"state":"open","locked":false,"title":"[MRG+1] ENH Restructure grid_scores_ into a hashmap of 1D (numpy) (masked) arrays that can be imported into pandas as a DataFrame.","user":{"login":"raghavrv","id":9487348,"avatar_url":"https://avatars.githubusercontent.com/u/9487348?v=3","gravatar_id":"","url":"https://api.github.com/users/raghavrv","html_url":"https://github.com/raghavrv","followers_url":"https://api.github.com/users/raghavrv/followers","following_url":"https://api.github.com/users/raghavrv/following{/other_user}","gists_url":"https://api.github.com/users/raghavrv/gists{/gist_id}","starred_url":"https://api.github.com/users/raghavrv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raghavrv/subscriptions","organizations_url":"https://api.github.com/users/raghavrv/orgs","repos_url":"https://api.github.com/users/raghavrv/repos","events_url":"https://api.github.com/users/raghavrv/events{/privacy}","received_events_url":"https://api.github.com/users/raghavrv/received_events","type":"User","site_admin":false},"body":"Overrides/Fixes #6686, #1034, #1787, #1768\r\n\r\nAlso related #1742, #1020\r\n\r\nTangentially related #1850, #1837, #2759\r\n\r\nAlso adds a `name` to all the scorers\r\n\r\n- [x] `_get_scorer_name(checked_scoring_function)`.\r\n- [x] Test `_get_scorer_name`.\r\n- [x] Restructure `grid_scores_` into dict of (masked) numpy arrays, which can be easily imported into pandas.\r\n- [x] Old tests pass\r\n- [x] Modify old tests + New tests\r\n- [x] `_get_candidate_params()` --> `search.candidate_params_`\r\n- [x] Compute weighted std (for iid data.) + test\r\n- [x] Try vectorizing in bulk using reshape\r\n- [x] Examples ~~with nice plots?~~ (not for this PR)\r\n- [x] Doc + Whatsnew\r\n\r\nInitial reviews welcome!\r\n\r\n[The sandbox notebook](https://github.com/rvraghav93/multiple_metric_grid_search_sandbox/blob/master/multiple_metric_grid_search_sandbox.ipynb)\r\n\r\n@amueller @vene @jnothman @agramfort @GaelVaroquaux @mblondel @hlin117 @ogrisel ","created_at":"2016-04-22T17:54:43Z","updated_at":"2016-06-06T08:08:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a426e33156312da847accc68bc971099d494b013","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/6697/commits","review_comments_url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/6697/comments","review_comment_url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/comments{/number}","comments_url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/6697/comments","statuses_url":"https://api.github.com/repos/scikit-learn/scikit-learn/statuses/568ba7c10d9f7ea03629cf621894b66cc814c8d1","head":{"label":"raghavrv:multiple_metric_grid_search","ref":"multiple_metric_grid_search","sha":"568ba7c10d9f7ea03629cf621894b66cc814c8d1","user":{"login":"raghavrv","id":9487348,"avatar_url":"https://avatars.githubusercontent.com/u/9487348?v=3","gravatar_id":"","url":"https://api.github.com/users/raghavrv","html_url":"https://github.com/raghavrv","followers_url":"https://api.github.com/users/raghavrv/followers","following_url":"https://api.github.com/users/raghavrv/following{/other_user}","gists_url":"https://api.github.com/users/raghavrv/gists{/gist_id}","starred_url":"https://api.github.com/users/raghavrv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raghavrv/subscriptions","organizations_url":"https://api.github.com/users/raghavrv/orgs","repos_url":"https://api.github.com/users/raghavrv/repos","events_url":"https://api.github.com/users/raghavrv/events{/privacy}","received_events_url":"https://api.github.com/users/raghavrv/received_events","type":"User","site_admin":false},"repo":{"id":26038110,"name":"scikit-learn","full_name":"raghavrv/scikit-learn","owner":{"login":"raghavrv","id":9487348,"avatar_url":"https://avatars.githubusercontent.com/u/9487348?v=3","gravatar_id":"","url":"https://api.github.com/users/raghavrv","html_url":"https://github.com/raghavrv","followers_url":"https://api.github.com/users/raghavrv/followers","following_url":"https://api.github.com/users/raghavrv/following{/other_user}","gists_url":"https://api.github.com/users/raghavrv/gists{/gist_id}","starred_url":"https://api.github.com/users/raghavrv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raghavrv/subscriptions","organizations_url":"https://api.github.com/users/raghavrv/orgs","repos_url":"https://api.github.com/users/raghavrv/repos","events_url":"https://api.github.com/users/raghavrv/events{/privacy}","received_events_url":"https://api.github.com/users/raghavrv/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/raghavrv/scikit-learn","description":"scikit-learn: machine learning in Python","fork":true,"url":"https://api.github.com/repos/raghavrv/scikit-learn","forks_url":"https://api.github.com/repos/raghavrv/scikit-learn/forks","keys_url":"https://api.github.com/repos/raghavrv/scikit-learn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/raghavrv/scikit-learn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/raghavrv/scikit-learn/teams","hooks_url":"https://api.github.com/repos/raghavrv/scikit-learn/hooks","issue_events_url":"https://api.github.com/repos/raghavrv/scikit-learn/issues/events{/number}","events_url":"https://api.github.com/repos/raghavrv/scikit-learn/events","assignees_url":"https://api.github.com/repos/raghavrv/scikit-learn/assignees{/user}","branches_url":"https://api.github.com/repos/raghavrv/scikit-learn/branches{/branch}","tags_url":"https://api.github.com/repos/raghavrv/scikit-learn/tags","blobs_url":"https://api.github.com/repos/raghavrv/scikit-learn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/raghavrv/scikit-learn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/raghavrv/scikit-learn/git/refs{/sha}","trees_url":"https://api.github.com/repos/raghavrv/scikit-learn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/raghavrv/scikit-learn/statuses/{sha}","languages_url":"https://api.github.com/repos/raghavrv/scikit-learn/languages","stargazers_url":"https://api.github.com/repos/raghavrv/scikit-learn/stargazers","contributors_url":"https://api.github.com/repos/raghavrv/scikit-learn/contributors","subscribers_url":"https://api.github.com/repos/raghavrv/scikit-learn/subscribers","subscription_url":"https://api.github.com/repos/raghavrv/scikit-learn/subscription","commits_url":"https://api.github.com/repos/raghavrv/scikit-learn/commits{/sha}","git_commits_url":"https://api.github.com/repos/raghavrv/scikit-learn/git/commits{/sha}","comments_url":"https://api.github.com/repos/raghavrv/scikit-learn/comments{/number}","issue_comment_url":"https://api.github.com/repos/raghavrv/scikit-learn/issues/comments{/number}","contents_url":"https://api.github.com/repos/raghavrv/scikit-learn/contents/{+path}","compare_url":"https://api.github.com/repos/raghavrv/scikit-learn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/raghavrv/scikit-learn/merges","archive_url":"https://api.github.com/repos/raghavrv/scikit-learn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/raghavrv/scikit-learn/downloads","issues_url":"https://api.github.com/repos/raghavrv/scikit-learn/issues{/number}","pulls_url":"https://api.github.com/repos/raghavrv/scikit-learn/pulls{/number}","milestones_url":"https://api.github.com/repos/raghavrv/scikit-learn/milestones{/number}","notifications_url":"https://api.github.com/repos/raghavrv/scikit-learn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/raghavrv/scikit-learn/labels{/name}","releases_url":"https://api.github.com/repos/raghavrv/scikit-learn/releases{/id}","deployments_url":"https://api.github.com/repos/raghavrv/scikit-learn/deployments","created_at":"2014-11-01T00:56:31Z","updated_at":"2016-04-27T18:29:41Z","pushed_at":"2016-06-06T00:32:20Z","git_url":"git://github.com/raghavrv/scikit-learn.git","ssh_url":"git@github.com:raghavrv/scikit-learn.git","clone_url":"https://github.com/raghavrv/scikit-learn.git","svn_url":"https://github.com/raghavrv/scikit-learn","homepage":"http://scikit-learn.org","size":94140,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"scikit-learn:master","ref":"master","sha":"70d7fecaab23095cf3793977d3c15d1a21a7a868","user":{"login":"scikit-learn","id":365630,"avatar_url":"https://avatars.githubusercontent.com/u/365630?v=3","gravatar_id":"","url":"https://api.github.com/users/scikit-learn","html_url":"https://github.com/scikit-learn","followers_url":"https://api.github.com/users/scikit-learn/followers","following_url":"https://api.github.com/users/scikit-learn/following{/other_user}","gists_url":"https://api.github.com/users/scikit-learn/gists{/gist_id}","starred_url":"https://api.github.com/users/scikit-learn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scikit-learn/subscriptions","organizations_url":"https://api.github.com/users/scikit-learn/orgs","repos_url":"https://api.github.com/users/scikit-learn/repos","events_url":"https://api.github.com/users/scikit-learn/events{/privacy}","received_events_url":"https://api.github.com/users/scikit-learn/received_events","type":"Organization","site_admin":false},"repo":{"id":843222,"name":"scikit-learn","full_name":"scikit-learn/scikit-learn","owner":{"login":"scikit-learn","id":365630,"avatar_url":"https://avatars.githubusercontent.com/u/365630?v=3","gravatar_id":"","url":"https://api.github.com/users/scikit-learn","html_url":"https://github.com/scikit-learn","followers_url":"https://api.github.com/users/scikit-learn/followers","following_url":"https://api.github.com/users/scikit-learn/following{/other_user}","gists_url":"https://api.github.com/users/scikit-learn/gists{/gist_id}","starred_url":"https://api.github.com/users/scikit-learn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scikit-learn/subscriptions","organizations_url":"https://api.github.com/users/scikit-learn/orgs","repos_url":"https://api.github.com/users/scikit-learn/repos","events_url":"https://api.github.com/users/scikit-learn/events{/privacy}","received_events_url":"https://api.github.com/users/scikit-learn/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/scikit-learn/scikit-learn","description":"scikit-learn: machine learning in Python","fork":false,"url":"https://api.github.com/repos/scikit-learn/scikit-learn","forks_url":"https://api.github.com/repos/scikit-learn/scikit-learn/forks","keys_url":"https://api.github.com/repos/scikit-learn/scikit-learn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/scikit-learn/scikit-learn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/scikit-learn/scikit-learn/teams","hooks_url":"https://api.github.com/repos/scikit-learn/scikit-learn/hooks","issue_events_url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/events{/number}","events_url":"https://api.github.com/repos/scikit-learn/scikit-learn/events","assignees_url":"https://api.github.com/repos/scikit-learn/scikit-learn/assignees{/user}","branches_url":"https://api.github.com/repos/scikit-learn/scikit-learn/branches{/branch}","tags_url":"https://api.github.com/repos/scikit-learn/scikit-learn/tags","blobs_url":"https://api.github.com/repos/scikit-learn/scikit-learn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/scikit-learn/scikit-learn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/scikit-learn/scikit-learn/git/refs{/sha}","trees_url":"https://api.github.com/repos/scikit-learn/scikit-learn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/scikit-learn/scikit-learn/statuses/{sha}","languages_url":"https://api.github.com/repos/scikit-learn/scikit-learn/languages","stargazers_url":"https://api.github.com/repos/scikit-learn/scikit-learn/stargazers","contributors_url":"https://api.github.com/repos/scikit-learn/scikit-learn/contributors","subscribers_url":"https://api.github.com/repos/scikit-learn/scikit-learn/subscribers","subscription_url":"https://api.github.com/repos/scikit-learn/scikit-learn/subscription","commits_url":"https://api.github.com/repos/scikit-learn/scikit-learn/commits{/sha}","git_commits_url":"https://api.github.com/repos/scikit-learn/scikit-learn/git/commits{/sha}","comments_url":"https://api.github.com/repos/scikit-learn/scikit-learn/comments{/number}","issue_comment_url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/comments{/number}","contents_url":"https://api.github.com/repos/scikit-learn/scikit-learn/contents/{+path}","compare_url":"https://api.github.com/repos/scikit-learn/scikit-learn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/scikit-learn/scikit-learn/merges","archive_url":"https://api.github.com/repos/scikit-learn/scikit-learn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/scikit-learn/scikit-learn/downloads","issues_url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues{/number}","pulls_url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls{/number}","milestones_url":"https://api.github.com/repos/scikit-learn/scikit-learn/milestones{/number}","notifications_url":"https://api.github.com/repos/scikit-learn/scikit-learn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/scikit-learn/scikit-learn/labels{/name}","releases_url":"https://api.github.com/repos/scikit-learn/scikit-learn/releases{/id}","deployments_url":"https://api.github.com/repos/scikit-learn/scikit-learn/deployments","created_at":"2010-08-17T09:43:38Z","updated_at":"2016-06-06T08:02:04Z","pushed_at":"2016-06-06T00:35:27Z","git_url":"git://github.com/scikit-learn/scikit-learn.git","ssh_url":"git@github.com:scikit-learn/scikit-learn.git","clone_url":"https://github.com/scikit-learn/scikit-learn.git","svn_url":"https://github.com/scikit-learn/scikit-learn","homepage":"http://scikit-learn.org","size":123929,"stargazers_count":11742,"watchers_count":11742,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6821,"mirror_url":null,"open_issues_count":1201,"forks":6821,"open_issues":1201,"watchers":11742,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/6697"},"html":{"href":"https://github.com/scikit-learn/scikit-learn/pull/6697"},"issue":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/6697"},"comments":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/6697/comments"},"review_comments":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/6697/comments"},"review_comment":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/6697/commits"},"statuses":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/statuses/568ba7c10d9f7ea03629cf621894b66cc814c8d1"}}}}
{"actor":{"display_login":"ogrisel"}}