{"action":"created","comment":{"url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/comments/42606082","id":42606082,"diff_hunk":"@@ -542,12 +542,12 @@ def test_logistic_regressioncv_class_weights():\n     X, y = make_classification(n_samples=20, n_features=20, n_informative=10,\n                                n_classes=3, random_state=0)\n \n-    # Test the liblinear fails when class_weight of type dict is\n-    # provided, when it is multiclass. However it can handle\n-    # binary problems.\n+    msg = (\"In LogisticRegressionCV the liblinear solver cannot handle \"","path":"sklearn/linear_model/tests/test_logistic.py","position":28,"original_position":23,"commit_id":"3a649cedcae1dfcb6126218743b0522812d7c69a","original_commit_id":"bd303896030c0a72c7c6bed2eb4a6225f307eb18","user":{"login":"amueller","id":449558,"avatar_url":"https://avatars.githubusercontent.com/u/449558?v=3","gravatar_id":"","url":"https://api.github.com/users/amueller","html_url":"https://github.com/amueller","followers_url":"https://api.github.com/users/amueller/followers","following_url":"https://api.github.com/users/amueller/following{/other_user}","gists_url":"https://api.github.com/users/amueller/gists{/gist_id}","starred_url":"https://api.github.com/users/amueller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amueller/subscriptions","organizations_url":"https://api.github.com/users/amueller/orgs","repos_url":"https://api.github.com/users/amueller/repos","events_url":"https://api.github.com/users/amueller/events{/privacy}","received_events_url":"https://api.github.com/users/amueller/received_events","type":"User","site_admin":false},"body":"But it does support ``class_weight``, right? It's odd to support ``balanced`` but not dicts.","created_at":"2015-10-21T10:17:28Z","updated_at":"2015-10-21T10:17:28Z","html_url":"https://github.com/scikit-learn/scikit-learn/pull/5008#discussion_r42606082","pull_request_url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/5008","_links":{"self":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/comments/42606082"},"html":{"href":"https://github.com/scikit-learn/scikit-learn/pull/5008#discussion_r42606082"},"pull_request":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/5008"}}},"pull_request":{"url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/5008","id":40354774,"html_url":"https://github.com/scikit-learn/scikit-learn/pull/5008","diff_url":"https://github.com/scikit-learn/scikit-learn/pull/5008.diff","patch_url":"https://github.com/scikit-learn/scikit-learn/pull/5008.patch","issue_url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/5008","number":5008,"state":"open","locked":false,"title":"[MRG] fix logistic regression class weights","user":{"login":"TomDLT","id":11065596,"avatar_url":"https://avatars.githubusercontent.com/u/11065596?v=3","gravatar_id":"","url":"https://api.github.com/users/TomDLT","html_url":"https://github.com/TomDLT","followers_url":"https://api.github.com/users/TomDLT/followers","following_url":"https://api.github.com/users/TomDLT/following{/other_user}","gists_url":"https://api.github.com/users/TomDLT/gists{/gist_id}","starred_url":"https://api.github.com/users/TomDLT/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TomDLT/subscriptions","organizations_url":"https://api.github.com/users/TomDLT/orgs","repos_url":"https://api.github.com/users/TomDLT/repos","events_url":"https://api.github.com/users/TomDLT/events{/privacy}","received_events_url":"https://api.github.com/users/TomDLT/received_events","type":"User","site_admin":false},"body":"-This PR tests that these two classifiers are equivalent:\r\n```python\r\nclass_weights = compute_class_weight(\"balanced\", np.unique(y), y)\r\nclf1 = LogisticRegression(multi_class=\"multinomial\", class_weight=\"balanced\")\r\nclf2 = LogisticRegression(multi_class=\"multinomial\", class_weight=class_weights)\r\n```\r\n-[EDIT]This PR also tests that these two classifiers are equivalent: (fix #5450)\r\n```python\r\nclass_weights = compute_class_weight(\"balanced\", np.unique(y), y)\r\nclf1 = LogisticRegressionCV(class_weight=\"balanced\")\r\nclf2 = LogisticRegressionCV(class_weight=class_weights)\r\n```\r\nThat is why we can remove [this line](https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/tests/test_common.py#L116)\r\n\r\nI also : \r\n- updated some remaining `\"auto\"` (deprecated) into `\"balanced\"`.\r\n- added the test from #5420, which tests the bug detailed in #5415.\r\n- changed the variable names to distinguish `y_bin` and `Y_bin`","created_at":"2015-07-20T14:02:20Z","updated_at":"2015-10-21T10:17:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"dd9b25c3fcaea44e4e76672358e6cb899ae9957f","assignee":null,"milestone":{"url":"https://api.github.com/repos/scikit-learn/scikit-learn/milestones/15","html_url":"https://github.com/scikit-learn/scikit-learn/milestones/0.17","labels_url":"https://api.github.com/repos/scikit-learn/scikit-learn/milestones/15/labels","id":995666,"number":15,"title":"0.17","description":"","creator":{"login":"amueller","id":449558,"avatar_url":"https://avatars.githubusercontent.com/u/449558?v=3","gravatar_id":"","url":"https://api.github.com/users/amueller","html_url":"https://github.com/amueller","followers_url":"https://api.github.com/users/amueller/followers","following_url":"https://api.github.com/users/amueller/following{/other_user}","gists_url":"https://api.github.com/users/amueller/gists{/gist_id}","starred_url":"https://api.github.com/users/amueller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amueller/subscriptions","organizations_url":"https://api.github.com/users/amueller/orgs","repos_url":"https://api.github.com/users/amueller/repos","events_url":"https://api.github.com/users/amueller/events{/privacy}","received_events_url":"https://api.github.com/users/amueller/received_events","type":"User","site_admin":false},"open_issues":31,"closed_issues":88,"state":"open","created_at":"2015-02-25T18:59:07Z","updated_at":"2015-10-21T09:42:27Z","due_on":"2015-09-20T04:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/5008/commits","review_comments_url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/5008/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/5008/comments","statuses_url":"https://api.github.com/repos/scikit-learn/scikit-learn/statuses/3a649cedcae1dfcb6126218743b0522812d7c69a","head":{"label":"TomDLT:logistic_multiclass","ref":"logistic_multiclass","sha":"3a649cedcae1dfcb6126218743b0522812d7c69a","user":{"login":"TomDLT","id":11065596,"avatar_url":"https://avatars.githubusercontent.com/u/11065596?v=3","gravatar_id":"","url":"https://api.github.com/users/TomDLT","html_url":"https://github.com/TomDLT","followers_url":"https://api.github.com/users/TomDLT/followers","following_url":"https://api.github.com/users/TomDLT/following{/other_user}","gists_url":"https://api.github.com/users/TomDLT/gists{/gist_id}","starred_url":"https://api.github.com/users/TomDLT/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TomDLT/subscriptions","organizations_url":"https://api.github.com/users/TomDLT/orgs","repos_url":"https://api.github.com/users/TomDLT/repos","events_url":"https://api.github.com/users/TomDLT/events{/privacy}","received_events_url":"https://api.github.com/users/TomDLT/received_events","type":"User","site_admin":false},"repo":{"id":34376788,"name":"scikit-learn","full_name":"TomDLT/scikit-learn","owner":{"login":"TomDLT","id":11065596,"avatar_url":"https://avatars.githubusercontent.com/u/11065596?v=3","gravatar_id":"","url":"https://api.github.com/users/TomDLT","html_url":"https://github.com/TomDLT","followers_url":"https://api.github.com/users/TomDLT/followers","following_url":"https://api.github.com/users/TomDLT/following{/other_user}","gists_url":"https://api.github.com/users/TomDLT/gists{/gist_id}","starred_url":"https://api.github.com/users/TomDLT/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TomDLT/subscriptions","organizations_url":"https://api.github.com/users/TomDLT/orgs","repos_url":"https://api.github.com/users/TomDLT/repos","events_url":"https://api.github.com/users/TomDLT/events{/privacy}","received_events_url":"https://api.github.com/users/TomDLT/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/TomDLT/scikit-learn","description":"scikit-learn: machine learning in Python","fork":true,"url":"https://api.github.com/repos/TomDLT/scikit-learn","forks_url":"https://api.github.com/repos/TomDLT/scikit-learn/forks","keys_url":"https://api.github.com/repos/TomDLT/scikit-learn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/TomDLT/scikit-learn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/TomDLT/scikit-learn/teams","hooks_url":"https://api.github.com/repos/TomDLT/scikit-learn/hooks","issue_events_url":"https://api.github.com/repos/TomDLT/scikit-learn/issues/events{/number}","events_url":"https://api.github.com/repos/TomDLT/scikit-learn/events","assignees_url":"https://api.github.com/repos/TomDLT/scikit-learn/assignees{/user}","branches_url":"https://api.github.com/repos/TomDLT/scikit-learn/branches{/branch}","tags_url":"https://api.github.com/repos/TomDLT/scikit-learn/tags","blobs_url":"https://api.github.com/repos/TomDLT/scikit-learn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/TomDLT/scikit-learn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/TomDLT/scikit-learn/git/refs{/sha}","trees_url":"https://api.github.com/repos/TomDLT/scikit-learn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/TomDLT/scikit-learn/statuses/{sha}","languages_url":"https://api.github.com/repos/TomDLT/scikit-learn/languages","stargazers_url":"https://api.github.com/repos/TomDLT/scikit-learn/stargazers","contributors_url":"https://api.github.com/repos/TomDLT/scikit-learn/contributors","subscribers_url":"https://api.github.com/repos/TomDLT/scikit-learn/subscribers","subscription_url":"https://api.github.com/repos/TomDLT/scikit-learn/subscription","commits_url":"https://api.github.com/repos/TomDLT/scikit-learn/commits{/sha}","git_commits_url":"https://api.github.com/repos/TomDLT/scikit-learn/git/commits{/sha}","comments_url":"https://api.github.com/repos/TomDLT/scikit-learn/comments{/number}","issue_comment_url":"https://api.github.com/repos/TomDLT/scikit-learn/issues/comments{/number}","contents_url":"https://api.github.com/repos/TomDLT/scikit-learn/contents/{+path}","compare_url":"https://api.github.com/repos/TomDLT/scikit-learn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/TomDLT/scikit-learn/merges","archive_url":"https://api.github.com/repos/TomDLT/scikit-learn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/TomDLT/scikit-learn/downloads","issues_url":"https://api.github.com/repos/TomDLT/scikit-learn/issues{/number}","pulls_url":"https://api.github.com/repos/TomDLT/scikit-learn/pulls{/number}","milestones_url":"https://api.github.com/repos/TomDLT/scikit-learn/milestones{/number}","notifications_url":"https://api.github.com/repos/TomDLT/scikit-learn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/TomDLT/scikit-learn/labels{/name}","releases_url":"https://api.github.com/repos/TomDLT/scikit-learn/releases{/id}","created_at":"2015-04-22T07:53:08Z","updated_at":"2015-05-12T12:17:35Z","pushed_at":"2015-10-20T08:54:28Z","git_url":"git://github.com/TomDLT/scikit-learn.git","ssh_url":"git@github.com:TomDLT/scikit-learn.git","clone_url":"https://github.com/TomDLT/scikit-learn.git","svn_url":"https://github.com/TomDLT/scikit-learn","homepage":"http://scikit-learn.org","size":69172,"stargazers_count":0,"watchers_count":0,"language":"Python","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":"d4e9d7991af3d036bb50e44b4356ff5f9bee559c","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-10-21T09:49:02Z","pushed_at":"2015-10-21T10:17:03Z","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":138274,"stargazers_count":7926,"watchers_count":7926,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4720,"mirror_url":null,"open_issues_count":775,"forks":4720,"open_issues":775,"watchers":7926,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/5008"},"html":{"href":"https://github.com/scikit-learn/scikit-learn/pull/5008"},"issue":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/5008"},"comments":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/5008/comments"},"review_comments":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/5008/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/5008/commits"},"statuses":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/statuses/3a649cedcae1dfcb6126218743b0522812d7c69a"}}}}