{"action":"created","comment":{"url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/comments/221443503","pull_request_review_id":160097241,"id":221443503,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyMTQ0MzUwMw==","diff_hunk":"@@ -1607,6 +1658,9 @@ class LogisticRegressionCV(LogisticRegression, BaseEstimator,\n         Array of C i.e. inverse of regularization parameter values used\n         for cross-validation.\n \n+    l1_ratios_ : array\n+        Array of l1_ratios used for cross-validation.\n+\n     coefs_paths_ : array, shape ``(n_folds, len(Cs_), n_features)`` or \\","path":"sklearn/linear_model/logistic.py","position":312,"original_position":312,"commit_id":"ea1fbc1fb3c0362a86a51ccaf3875df3d7ed2d54","original_commit_id":"ea1fbc1fb3c0362a86a51ccaf3875df3d7ed2d54","user":{"login":"jnothman","id":78827,"node_id":"MDQ6VXNlcjc4ODI3","avatar_url":"https://avatars2.githubusercontent.com/u/78827?v=4","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":"Shouldn't there be one for each `l1_ratio`? Surely l1_ratios should become another dimension. See also shape of `ElasticNetCV.mse_paths_` (which is quite different... and I'm not really sure why we're storing all the coefs; it seems expensive)","created_at":"2018-09-30T00:41:22Z","updated_at":"2018-09-30T00:42:42Z","html_url":"https://github.com/scikit-learn/scikit-learn/pull/11646#discussion_r221443503","pull_request_url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/11646","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/comments/221443503"},"html":{"href":"https://github.com/scikit-learn/scikit-learn/pull/11646#discussion_r221443503"},"pull_request":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/11646"}}},"pull_request":{"url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/11646","id":202976832,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAyOTc2ODMy","html_url":"https://github.com/scikit-learn/scikit-learn/pull/11646","diff_url":"https://github.com/scikit-learn/scikit-learn/pull/11646.diff","patch_url":"https://github.com/scikit-learn/scikit-learn/pull/11646.patch","issue_url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/11646","number":11646,"state":"open","locked":false,"title":"[MRG] Add elastic net penalty to LogisticRegression","user":{"login":"NicolasHug","id":1190450,"node_id":"MDQ6VXNlcjExOTA0NTA=","avatar_url":"https://avatars2.githubusercontent.com/u/1190450?v=4","gravatar_id":"","url":"https://api.github.com/users/NicolasHug","html_url":"https://github.com/NicolasHug","followers_url":"https://api.github.com/users/NicolasHug/followers","following_url":"https://api.github.com/users/NicolasHug/following{/other_user}","gists_url":"https://api.github.com/users/NicolasHug/gists{/gist_id}","starred_url":"https://api.github.com/users/NicolasHug/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NicolasHug/subscriptions","organizations_url":"https://api.github.com/users/NicolasHug/orgs","repos_url":"https://api.github.com/users/NicolasHug/repos","events_url":"https://api.github.com/users/NicolasHug/events{/privacy}","received_events_url":"https://api.github.com/users/NicolasHug/received_events","type":"User","site_admin":false},"body":"<!--\r\nThanks for contributing a pull request! Please ensure you have taken a look at\r\nthe contribution guidelines: https://github.com/scikit-learn/scikit-learn/blob/master/CONTRIBUTING.md#pull-request-checklist\r\n-->\r\n\r\n#### Reference Issues/PRs\r\n<!--\r\nExample: Fixes #1234. See also #3456.\r\nPlease use keywords (e.g., Fixes) to create link to the issues or pull requests\r\nyou resolved, so that they will automatically be closed when your pull request\r\nis merged. See https://github.com/blog/1506-closing-issues-via-pull-requests\r\n-->\r\n\r\nCloses #8288\r\n\r\n#### What does this implement/fix? Explain your changes.\r\n\r\nThis PR allows the use of `penalty='elastic-net'` for the `LogisticRegression` class. Elastic net is already available in the saga solver, it's just not exposed yet.\r\n\r\n#### Any other comments?\r\n\r\n~~I set the `l1_ratio` parameter to 0.5 by default, because that's the default in `ElasticNet`. Should I set it to `None`? This would allow to raise an error if it's set to something else while `penalty != 'elastic-net'`.~~ \r\nEDIT: I set it to None and issue warning if penalty != elastic-net\r\n\r\n#### TODO\r\n\r\n- [X] expose `penalty='elastic-net'` in `LogisticRegression`\r\n- [X] expose `penalty='elastic-net'` in `LogisticRegressionCV`\r\n- [X] Update doc\r\n- [X] write tests\r\n- [X] Update examples\r\n\r\n<!--\r\nPlease be aware that we are a loose team of volunteers so patience is\r\nnecessary; assistance handling other issues is very welcome. We value\r\nall user contributions, no matter how minor they are. If we are slow to\r\nreview, either the pull request needs some benchmarking, tinkering,\r\nconvincing, etc. or more likely the reviewers are simply busy. In either\r\ncase, we ask for your understanding during the review process.\r\nFor more information, see our FAQ on this topic:\r\nhttp://scikit-learn.org/dev/faq.html#why-is-my-pull-request-not-getting-any-attention.\r\n\r\nThanks for contributing!\r\n-->\r\n","created_at":"2018-07-20T23:28:32Z","updated_at":"2018-09-30T00:42:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ecce47a4274a1f947337d0d64f1bbfe6feda9c51","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/11646/commits","review_comments_url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/11646/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/11646/comments","statuses_url":"https://api.github.com/repos/scikit-learn/scikit-learn/statuses/ea1fbc1fb3c0362a86a51ccaf3875df3d7ed2d54","head":{"label":"NicolasHug:elastic_net_linear_classifier","ref":"elastic_net_linear_classifier","sha":"ea1fbc1fb3c0362a86a51ccaf3875df3d7ed2d54","user":{"login":"NicolasHug","id":1190450,"node_id":"MDQ6VXNlcjExOTA0NTA=","avatar_url":"https://avatars2.githubusercontent.com/u/1190450?v=4","gravatar_id":"","url":"https://api.github.com/users/NicolasHug","html_url":"https://github.com/NicolasHug","followers_url":"https://api.github.com/users/NicolasHug/followers","following_url":"https://api.github.com/users/NicolasHug/following{/other_user}","gists_url":"https://api.github.com/users/NicolasHug/gists{/gist_id}","starred_url":"https://api.github.com/users/NicolasHug/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NicolasHug/subscriptions","organizations_url":"https://api.github.com/users/NicolasHug/orgs","repos_url":"https://api.github.com/users/NicolasHug/repos","events_url":"https://api.github.com/users/NicolasHug/events{/privacy}","received_events_url":"https://api.github.com/users/NicolasHug/received_events","type":"User","site_admin":false},"repo":{"id":139458972,"node_id":"MDEwOlJlcG9zaXRvcnkxMzk0NTg5NzI=","name":"scikit-learn","full_name":"NicolasHug/scikit-learn","private":false,"owner":{"login":"NicolasHug","id":1190450,"node_id":"MDQ6VXNlcjExOTA0NTA=","avatar_url":"https://avatars2.githubusercontent.com/u/1190450?v=4","gravatar_id":"","url":"https://api.github.com/users/NicolasHug","html_url":"https://github.com/NicolasHug","followers_url":"https://api.github.com/users/NicolasHug/followers","following_url":"https://api.github.com/users/NicolasHug/following{/other_user}","gists_url":"https://api.github.com/users/NicolasHug/gists{/gist_id}","starred_url":"https://api.github.com/users/NicolasHug/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NicolasHug/subscriptions","organizations_url":"https://api.github.com/users/NicolasHug/orgs","repos_url":"https://api.github.com/users/NicolasHug/repos","events_url":"https://api.github.com/users/NicolasHug/events{/privacy}","received_events_url":"https://api.github.com/users/NicolasHug/received_events","type":"User","site_admin":false},"html_url":"https://github.com/NicolasHug/scikit-learn","description":"scikit-learn: machine learning in Python","fork":true,"url":"https://api.github.com/repos/NicolasHug/scikit-learn","forks_url":"https://api.github.com/repos/NicolasHug/scikit-learn/forks","keys_url":"https://api.github.com/repos/NicolasHug/scikit-learn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/NicolasHug/scikit-learn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/NicolasHug/scikit-learn/teams","hooks_url":"https://api.github.com/repos/NicolasHug/scikit-learn/hooks","issue_events_url":"https://api.github.com/repos/NicolasHug/scikit-learn/issues/events{/number}","events_url":"https://api.github.com/repos/NicolasHug/scikit-learn/events","assignees_url":"https://api.github.com/repos/NicolasHug/scikit-learn/assignees{/user}","branches_url":"https://api.github.com/repos/NicolasHug/scikit-learn/branches{/branch}","tags_url":"https://api.github.com/repos/NicolasHug/scikit-learn/tags","blobs_url":"https://api.github.com/repos/NicolasHug/scikit-learn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/NicolasHug/scikit-learn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/NicolasHug/scikit-learn/git/refs{/sha}","trees_url":"https://api.github.com/repos/NicolasHug/scikit-learn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/NicolasHug/scikit-learn/statuses/{sha}","languages_url":"https://api.github.com/repos/NicolasHug/scikit-learn/languages","stargazers_url":"https://api.github.com/repos/NicolasHug/scikit-learn/stargazers","contributors_url":"https://api.github.com/repos/NicolasHug/scikit-learn/contributors","subscribers_url":"https://api.github.com/repos/NicolasHug/scikit-learn/subscribers","subscription_url":"https://api.github.com/repos/NicolasHug/scikit-learn/subscription","commits_url":"https://api.github.com/repos/NicolasHug/scikit-learn/commits{/sha}","git_commits_url":"https://api.github.com/repos/NicolasHug/scikit-learn/git/commits{/sha}","comments_url":"https://api.github.com/repos/NicolasHug/scikit-learn/comments{/number}","issue_comment_url":"https://api.github.com/repos/NicolasHug/scikit-learn/issues/comments{/number}","contents_url":"https://api.github.com/repos/NicolasHug/scikit-learn/contents/{+path}","compare_url":"https://api.github.com/repos/NicolasHug/scikit-learn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/NicolasHug/scikit-learn/merges","archive_url":"https://api.github.com/repos/NicolasHug/scikit-learn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/NicolasHug/scikit-learn/downloads","issues_url":"https://api.github.com/repos/NicolasHug/scikit-learn/issues{/number}","pulls_url":"https://api.github.com/repos/NicolasHug/scikit-learn/pulls{/number}","milestones_url":"https://api.github.com/repos/NicolasHug/scikit-learn/milestones{/number}","notifications_url":"https://api.github.com/repos/NicolasHug/scikit-learn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/NicolasHug/scikit-learn/labels{/name}","releases_url":"https://api.github.com/repos/NicolasHug/scikit-learn/releases{/id}","deployments_url":"https://api.github.com/repos/NicolasHug/scikit-learn/deployments","created_at":"2018-07-02T15:07:27Z","updated_at":"2018-09-24T19:29:23Z","pushed_at":"2018-09-28T19:48:14Z","git_url":"git://github.com/NicolasHug/scikit-learn.git","ssh_url":"git@github.com:NicolasHug/scikit-learn.git","clone_url":"https://github.com/NicolasHug/scikit-learn.git","svn_url":"https://github.com/NicolasHug/scikit-learn","homepage":"http://scikit-learn.org","size":93772,"stargazers_count":2,"watchers_count":2,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"NOASSERTION","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":2,"default_branch":"master"}},"base":{"label":"scikit-learn:master","ref":"master","sha":"ddf37c75c7b912104df56e1325363cd94a4fdd5f","user":{"login":"scikit-learn","id":365630,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM2NTYzMA==","avatar_url":"https://avatars2.githubusercontent.com/u/365630?v=4","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,"node_id":"MDEwOlJlcG9zaXRvcnk4NDMyMjI=","name":"scikit-learn","full_name":"scikit-learn/scikit-learn","private":false,"owner":{"login":"scikit-learn","id":365630,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM2NTYzMA==","avatar_url":"https://avatars2.githubusercontent.com/u/365630?v=4","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},"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":"2018-09-30T00:42:06Z","pushed_at":"2018-09-30T00:39:42Z","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":95010,"stargazers_count":30799,"watchers_count":30799,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":15210,"mirror_url":null,"archived":false,"open_issues_count":1731,"license":{"key":"other","name":"NOASSERTION","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":15210,"open_issues":1731,"watchers":30799,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/11646"},"html":{"href":"https://github.com/scikit-learn/scikit-learn/pull/11646"},"issue":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/11646"},"comments":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/11646/comments"},"review_comments":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/11646/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/11646/commits"},"statuses":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/statuses/ea1fbc1fb3c0362a86a51ccaf3875df3d7ed2d54"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"jnothman"}}