{"action":"created","comment":{"url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/comments/25641105","id":25641105,"diff_hunk":"@@ -138,18 +138,23 @@ def test_precision_recall_f1_score_binary():\n \n     # individual scoring function that can be used for grid search: in the\n     # binary class case the score is the value of the measure for the positive\n-    # class (e.g. label == 1)\n-    ps = precision_score(y_true, y_pred)\n-    assert_array_almost_equal(ps, 0.85, 2)\n+    # class (e.g. label == 1). This is deprecated for average != 'binary'.\n+    assert_dep_warning = partial(assert_warns, DeprecationWarning)\n+    for kwargs, my_assert in [({}, assert_no_warnings),\n+                              ({'average': 'binary'}, assert_no_warnings),\n+                              ({'average': 'micro'}, assert_dep_warning)]:","path":"sklearn/metrics/tests/test_classification.py","position":11,"original_position":11,"commit_id":"4fcf20a5d26ceff26ce5835aff42ab199e5cd880","original_commit_id":"4fcf20a5d26ceff26ce5835aff42ab199e5cd880","user":{"login":"jnothman","id":78827,"avatar_url":"https://avatars.githubusercontent.com/u/78827?v=3","gravatar_id":"","url":"https://api.github.com/users/jnothman","html_url":"https://github.com/jnothman","followers_url":"https://api.github.com/users/jnothman/followers","following_url":"https://api.github.com/users/jnothman/following{/other_user}","gists_url":"https://api.github.com/users/jnothman/gists{/gist_id}","starred_url":"https://api.github.com/users/jnothman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jnothman/subscriptions","organizations_url":"https://api.github.com/users/jnothman/orgs","repos_url":"https://api.github.com/users/jnothman/repos","events_url":"https://api.github.com/users/jnothman/events{/privacy}","received_events_url":"https://api.github.com/users/jnothman/received_events","type":"User","site_admin":false},"body":"I think the line before saying \"this is deprecated for average != binary\" is quite clear.\r\n\r\nThe point is that if I explicitly say \"average='macro'\", the score shouldn't automatically ignore one label, though that is the current behaviour.","created_at":"2015-03-02T21:39:50Z","updated_at":"2015-03-02T21:39:50Z","html_url":"https://github.com/scikit-learn/scikit-learn/pull/4192#discussion_r25641105","pull_request_url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/4192","_links":{"self":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/comments/25641105"},"html":{"href":"https://github.com/scikit-learn/scikit-learn/pull/4192#discussion_r25641105"},"pull_request":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/4192"}}},"pull_request":{"url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/4192","id":28431018,"html_url":"https://github.com/scikit-learn/scikit-learn/pull/4192","diff_url":"https://github.com/scikit-learn/scikit-learn/pull/4192.diff","patch_url":"https://github.com/scikit-learn/scikit-learn/pull/4192.patch","issue_url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/4192","number":4192,"state":"open","locked":false,"title":"[MRG+1] P/R/F: in future, average='binary' iff 2 labels in y one of which is pos_label","user":{"login":"jnothman","id":78827,"avatar_url":"https://avatars.githubusercontent.com/u/78827?v=3","gravatar_id":"","url":"https://api.github.com/users/jnothman","html_url":"https://github.com/jnothman","followers_url":"https://api.github.com/users/jnothman/followers","following_url":"https://api.github.com/users/jnothman/following{/other_user}","gists_url":"https://api.github.com/users/jnothman/gists{/gist_id}","starred_url":"https://api.github.com/users/jnothman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jnothman/subscriptions","organizations_url":"https://api.github.com/users/jnothman/orgs","repos_url":"https://api.github.com/users/jnothman/repos","events_url":"https://api.github.com/users/jnothman/events{/privacy}","received_events_url":"https://api.github.com/users/jnothman/received_events","type":"User","site_admin":false},"body":"As per [my comment elsewhere](https://github.com/scikit-learn/scikit-learn/pull/2610#issuecomment-72362227), this attempts to complete #2679 by implementing the converse in the precision-recall-fscore family: binary data should not be handled specially when `average != 'binary'`. This PR fixes a bug where `pos_label=None` -- which makes binary data not be handled specially -- was not being treated appropriately.","created_at":"2015-02-01T13:23:28Z","updated_at":"2015-03-02T21:39:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e8cfa1397e8f1b5c251ba15104a1a5509fd12bda","assignee":null,"milestone":{"url":"https://api.github.com/repos/scikit-learn/scikit-learn/milestones/12","html_url":"https://github.com/scikit-learn/scikit-learn/milestones/0.16","labels_url":"https://api.github.com/repos/scikit-learn/scikit-learn/milestones/12/labels","id":527004,"number":12,"title":"0.16","description":"","creator":{"login":"GaelVaroquaux","id":208217,"avatar_url":"https://avatars.githubusercontent.com/u/208217?v=3","gravatar_id":"","url":"https://api.github.com/users/GaelVaroquaux","html_url":"https://github.com/GaelVaroquaux","followers_url":"https://api.github.com/users/GaelVaroquaux/followers","following_url":"https://api.github.com/users/GaelVaroquaux/following{/other_user}","gists_url":"https://api.github.com/users/GaelVaroquaux/gists{/gist_id}","starred_url":"https://api.github.com/users/GaelVaroquaux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GaelVaroquaux/subscriptions","organizations_url":"https://api.github.com/users/GaelVaroquaux/orgs","repos_url":"https://api.github.com/users/GaelVaroquaux/repos","events_url":"https://api.github.com/users/GaelVaroquaux/events{/privacy}","received_events_url":"https://api.github.com/users/GaelVaroquaux/received_events","type":"User","site_admin":false},"open_issues":63,"closed_issues":82,"state":"open","created_at":"2014-01-05T21:19:20Z","updated_at":"2015-03-02T19:49:48Z","due_on":"2016-01-31T05:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/4192/commits","review_comments_url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/4192/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/4192/comments","statuses_url":"https://api.github.com/repos/scikit-learn/scikit-learn/statuses/4fcf20a5d26ceff26ce5835aff42ab199e5cd880","head":{"label":"jnothman:binary_iff_binary","ref":"binary_iff_binary","sha":"4fcf20a5d26ceff26ce5835aff42ab199e5cd880","user":{"login":"jnothman","id":78827,"avatar_url":"https://avatars.githubusercontent.com/u/78827?v=3","gravatar_id":"","url":"https://api.github.com/users/jnothman","html_url":"https://github.com/jnothman","followers_url":"https://api.github.com/users/jnothman/followers","following_url":"https://api.github.com/users/jnothman/following{/other_user}","gists_url":"https://api.github.com/users/jnothman/gists{/gist_id}","starred_url":"https://api.github.com/users/jnothman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jnothman/subscriptions","organizations_url":"https://api.github.com/users/jnothman/orgs","repos_url":"https://api.github.com/users/jnothman/repos","events_url":"https://api.github.com/users/jnothman/events{/privacy}","received_events_url":"https://api.github.com/users/jnothman/received_events","type":"User","site_admin":false},"repo":{"id":8691611,"name":"scikit-learn","full_name":"jnothman/scikit-learn","owner":{"login":"jnothman","id":78827,"avatar_url":"https://avatars.githubusercontent.com/u/78827?v=3","gravatar_id":"","url":"https://api.github.com/users/jnothman","html_url":"https://github.com/jnothman","followers_url":"https://api.github.com/users/jnothman/followers","following_url":"https://api.github.com/users/jnothman/following{/other_user}","gists_url":"https://api.github.com/users/jnothman/gists{/gist_id}","starred_url":"https://api.github.com/users/jnothman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jnothman/subscriptions","organizations_url":"https://api.github.com/users/jnothman/orgs","repos_url":"https://api.github.com/users/jnothman/repos","events_url":"https://api.github.com/users/jnothman/events{/privacy}","received_events_url":"https://api.github.com/users/jnothman/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jnothman/scikit-learn","description":"scikit-learn: machine learning in Python","fork":true,"url":"https://api.github.com/repos/jnothman/scikit-learn","forks_url":"https://api.github.com/repos/jnothman/scikit-learn/forks","keys_url":"https://api.github.com/repos/jnothman/scikit-learn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jnothman/scikit-learn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jnothman/scikit-learn/teams","hooks_url":"https://api.github.com/repos/jnothman/scikit-learn/hooks","issue_events_url":"https://api.github.com/repos/jnothman/scikit-learn/issues/events{/number}","events_url":"https://api.github.com/repos/jnothman/scikit-learn/events","assignees_url":"https://api.github.com/repos/jnothman/scikit-learn/assignees{/user}","branches_url":"https://api.github.com/repos/jnothman/scikit-learn/branches{/branch}","tags_url":"https://api.github.com/repos/jnothman/scikit-learn/tags","blobs_url":"https://api.github.com/repos/jnothman/scikit-learn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jnothman/scikit-learn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jnothman/scikit-learn/git/refs{/sha}","trees_url":"https://api.github.com/repos/jnothman/scikit-learn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jnothman/scikit-learn/statuses/{sha}","languages_url":"https://api.github.com/repos/jnothman/scikit-learn/languages","stargazers_url":"https://api.github.com/repos/jnothman/scikit-learn/stargazers","contributors_url":"https://api.github.com/repos/jnothman/scikit-learn/contributors","subscribers_url":"https://api.github.com/repos/jnothman/scikit-learn/subscribers","subscription_url":"https://api.github.com/repos/jnothman/scikit-learn/subscription","commits_url":"https://api.github.com/repos/jnothman/scikit-learn/commits{/sha}","git_commits_url":"https://api.github.com/repos/jnothman/scikit-learn/git/commits{/sha}","comments_url":"https://api.github.com/repos/jnothman/scikit-learn/comments{/number}","issue_comment_url":"https://api.github.com/repos/jnothman/scikit-learn/issues/comments{/number}","contents_url":"https://api.github.com/repos/jnothman/scikit-learn/contents/{+path}","compare_url":"https://api.github.com/repos/jnothman/scikit-learn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jnothman/scikit-learn/merges","archive_url":"https://api.github.com/repos/jnothman/scikit-learn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jnothman/scikit-learn/downloads","issues_url":"https://api.github.com/repos/jnothman/scikit-learn/issues{/number}","pulls_url":"https://api.github.com/repos/jnothman/scikit-learn/pulls{/number}","milestones_url":"https://api.github.com/repos/jnothman/scikit-learn/milestones{/number}","notifications_url":"https://api.github.com/repos/jnothman/scikit-learn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jnothman/scikit-learn/labels{/name}","releases_url":"https://api.github.com/repos/jnothman/scikit-learn/releases{/id}","created_at":"2013-03-10T21:10:51Z","updated_at":"2014-12-23T12:16:57Z","pushed_at":"2015-03-01T04:45:52Z","git_url":"git://github.com/jnothman/scikit-learn.git","ssh_url":"git@github.com:jnothman/scikit-learn.git","clone_url":"https://github.com/jnothman/scikit-learn.git","svn_url":"https://github.com/jnothman/scikit-learn","homepage":"http://scikit-learn.org","size":63757,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"scikit-learn:master","ref":"master","sha":"94157fadff639c2f574069168d3b3c8027d13d03","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}","created_at":"2010-08-17T09:43:38Z","updated_at":"2015-03-02T19:51:02Z","pushed_at":"2015-03-02T19:49:41Z","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":114666,"stargazers_count":5148,"watchers_count":5148,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3037,"mirror_url":null,"open_issues_count":570,"forks":3037,"open_issues":570,"watchers":5148,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/4192"},"html":{"href":"https://github.com/scikit-learn/scikit-learn/pull/4192"},"issue":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/4192"},"comments":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/4192/comments"},"review_comments":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/4192/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/4192/commits"},"statuses":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/statuses/4fcf20a5d26ceff26ce5835aff42ab199e5cd880"}}}}