{"action":"created","comment":{"url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/comments/83638865","pull_request_review_id":4468603,"id":83638865,"diff_hunk":"@@ -712,3 +713,18 @@ def test_enet_float_precision():\n             assert_array_almost_equal(intercept[np.float32],\n                                       intercept[np.float64],\n                                       decimal=4)\n+\n+\n+def test_enet_l1_ratio():\n+    # Test that an error message is raised if an estimator that\n+    # uses _alpha_grid is called with l1_ratio=0\n+    msg = (\"Automatic alpha grid generation is not supported for l1_ratio=0. \"\n+           \"Please supply a grid by providing your estimator with the \"\n+           \"appropriate `alphas=` argument.\")\n+    X = np.array([[1, 2, 4, 5, 8], [3, 5, 7, 7, 8]]).T\n+    y = np.array([12, 10, 11, 21, 5])\n+\n+    assert_raise_message(ValueError, msg,\n+                         ElasticNetCV(l1_ratio=0).fit, X, y)\n+    assert_raise_message(ValueError, msg,\n+                         MultiTaskElasticNetCV(l1_ratio=0).fit, X, X)","path":"sklearn/linear_model/tests/test_coordinate_descent.py","position":26,"original_position":26,"commit_id":"3fa201b3a8493826e336a36e2496c1481b0167fd","original_commit_id":"3fa201b3a8493826e336a36e2496c1481b0167fd","user":{"login":"agramfort","id":161052,"avatar_url":"https://avatars.githubusercontent.com/u/161052?v=3","gravatar_id":"","url":"https://api.github.com/users/agramfort","html_url":"https://github.com/agramfort","followers_url":"https://api.github.com/users/agramfort/followers","following_url":"https://api.github.com/users/agramfort/following{/other_user}","gists_url":"https://api.github.com/users/agramfort/gists{/gist_id}","starred_url":"https://api.github.com/users/agramfort/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/agramfort/subscriptions","organizations_url":"https://api.github.com/users/agramfort/orgs","repos_url":"https://api.github.com/users/agramfort/repos","events_url":"https://api.github.com/users/agramfort/events{/privacy}","received_events_url":"https://api.github.com/users/agramfort/received_events","type":"User","site_admin":false},"body":"test that is works with you pass some alphas","created_at":"2016-10-17T13:10:24Z","updated_at":"2016-10-17T13:10:29Z","html_url":"https://github.com/scikit-learn/scikit-learn/pull/7591#discussion_r83638865","pull_request_url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/7591","_links":{"self":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/comments/83638865"},"html":{"href":"https://github.com/scikit-learn/scikit-learn/pull/7591#discussion_r83638865"},"pull_request":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/7591"}}},"pull_request":{"url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/7591","id":88237225,"html_url":"https://github.com/scikit-learn/scikit-learn/pull/7591","diff_url":"https://github.com/scikit-learn/scikit-learn/pull/7591.diff","patch_url":"https://github.com/scikit-learn/scikit-learn/pull/7591.patch","issue_url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/7591","number":7591,"state":"open","locked":false,"title":"[MRG + 1] ElasticNetCV: raise ValueError if l1_ratio=0","user":{"login":"nuffe","id":7185264,"avatar_url":"https://avatars.githubusercontent.com/u/7185264?v=3","gravatar_id":"","url":"https://api.github.com/users/nuffe","html_url":"https://github.com/nuffe","followers_url":"https://api.github.com/users/nuffe/followers","following_url":"https://api.github.com/users/nuffe/following{/other_user}","gists_url":"https://api.github.com/users/nuffe/gists{/gist_id}","starred_url":"https://api.github.com/users/nuffe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nuffe/subscriptions","organizations_url":"https://api.github.com/users/nuffe/orgs","repos_url":"https://api.github.com/users/nuffe/repos","events_url":"https://api.github.com/users/nuffe/events{/privacy}","received_events_url":"https://api.github.com/users/nuffe/received_events","type":"User","site_admin":false},"body":"#### Reference Issue\r\nFixes #7551\r\n\r\n#### What does this implement/fix? Explain your changes.\r\nBefore,\r\n```py\r\nimport numpy as np\r\nfrom sklearn.linear_model import ElasticNetCV\r\nX = np.array([[1, 2, 4, 5, 8], [3, 5, 7, 7, 8]]).T\r\ny = np.array([12, 10, 11, 21, 5])\r\n\r\nest = ElasticNetCV(l1_ratio=0).fit(X, y)\r\n```\r\n\r\ngives the runtime error `UnboundLocalError: local variable 'best_l1_ratio' referenced before assignment`\r\n\r\nNow it returns `ValueError: l1_ratio = 0 not supported`\r\n","created_at":"2016-10-06T10:37:08Z","updated_at":"2016-10-17T13:10:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2f042552fd3e25586d9be3b1e0d30d1b3373a8bf","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/7591/commits","review_comments_url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/7591/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/7591/comments","statuses_url":"https://api.github.com/repos/scikit-learn/scikit-learn/statuses/3fa201b3a8493826e336a36e2496c1481b0167fd","head":{"label":"nuffe:elnet-l1ratio","ref":"elnet-l1ratio","sha":"3fa201b3a8493826e336a36e2496c1481b0167fd","user":{"login":"nuffe","id":7185264,"avatar_url":"https://avatars.githubusercontent.com/u/7185264?v=3","gravatar_id":"","url":"https://api.github.com/users/nuffe","html_url":"https://github.com/nuffe","followers_url":"https://api.github.com/users/nuffe/followers","following_url":"https://api.github.com/users/nuffe/following{/other_user}","gists_url":"https://api.github.com/users/nuffe/gists{/gist_id}","starred_url":"https://api.github.com/users/nuffe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nuffe/subscriptions","organizations_url":"https://api.github.com/users/nuffe/orgs","repos_url":"https://api.github.com/users/nuffe/repos","events_url":"https://api.github.com/users/nuffe/events{/privacy}","received_events_url":"https://api.github.com/users/nuffe/received_events","type":"User","site_admin":false},"repo":{"id":70131648,"name":"scikit-learn","full_name":"nuffe/scikit-learn","owner":{"login":"nuffe","id":7185264,"avatar_url":"https://avatars.githubusercontent.com/u/7185264?v=3","gravatar_id":"","url":"https://api.github.com/users/nuffe","html_url":"https://github.com/nuffe","followers_url":"https://api.github.com/users/nuffe/followers","following_url":"https://api.github.com/users/nuffe/following{/other_user}","gists_url":"https://api.github.com/users/nuffe/gists{/gist_id}","starred_url":"https://api.github.com/users/nuffe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nuffe/subscriptions","organizations_url":"https://api.github.com/users/nuffe/orgs","repos_url":"https://api.github.com/users/nuffe/repos","events_url":"https://api.github.com/users/nuffe/events{/privacy}","received_events_url":"https://api.github.com/users/nuffe/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/nuffe/scikit-learn","description":"scikit-learn: machine learning in Python","fork":true,"url":"https://api.github.com/repos/nuffe/scikit-learn","forks_url":"https://api.github.com/repos/nuffe/scikit-learn/forks","keys_url":"https://api.github.com/repos/nuffe/scikit-learn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nuffe/scikit-learn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nuffe/scikit-learn/teams","hooks_url":"https://api.github.com/repos/nuffe/scikit-learn/hooks","issue_events_url":"https://api.github.com/repos/nuffe/scikit-learn/issues/events{/number}","events_url":"https://api.github.com/repos/nuffe/scikit-learn/events","assignees_url":"https://api.github.com/repos/nuffe/scikit-learn/assignees{/user}","branches_url":"https://api.github.com/repos/nuffe/scikit-learn/branches{/branch}","tags_url":"https://api.github.com/repos/nuffe/scikit-learn/tags","blobs_url":"https://api.github.com/repos/nuffe/scikit-learn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nuffe/scikit-learn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nuffe/scikit-learn/git/refs{/sha}","trees_url":"https://api.github.com/repos/nuffe/scikit-learn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nuffe/scikit-learn/statuses/{sha}","languages_url":"https://api.github.com/repos/nuffe/scikit-learn/languages","stargazers_url":"https://api.github.com/repos/nuffe/scikit-learn/stargazers","contributors_url":"https://api.github.com/repos/nuffe/scikit-learn/contributors","subscribers_url":"https://api.github.com/repos/nuffe/scikit-learn/subscribers","subscription_url":"https://api.github.com/repos/nuffe/scikit-learn/subscription","commits_url":"https://api.github.com/repos/nuffe/scikit-learn/commits{/sha}","git_commits_url":"https://api.github.com/repos/nuffe/scikit-learn/git/commits{/sha}","comments_url":"https://api.github.com/repos/nuffe/scikit-learn/comments{/number}","issue_comment_url":"https://api.github.com/repos/nuffe/scikit-learn/issues/comments{/number}","contents_url":"https://api.github.com/repos/nuffe/scikit-learn/contents/{+path}","compare_url":"https://api.github.com/repos/nuffe/scikit-learn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nuffe/scikit-learn/merges","archive_url":"https://api.github.com/repos/nuffe/scikit-learn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nuffe/scikit-learn/downloads","issues_url":"https://api.github.com/repos/nuffe/scikit-learn/issues{/number}","pulls_url":"https://api.github.com/repos/nuffe/scikit-learn/pulls{/number}","milestones_url":"https://api.github.com/repos/nuffe/scikit-learn/milestones{/number}","notifications_url":"https://api.github.com/repos/nuffe/scikit-learn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nuffe/scikit-learn/labels{/name}","releases_url":"https://api.github.com/repos/nuffe/scikit-learn/releases{/id}","deployments_url":"https://api.github.com/repos/nuffe/scikit-learn/deployments","created_at":"2016-10-06T07:18:17Z","updated_at":"2016-10-06T07:18:26Z","pushed_at":"2016-10-16T09:42:23Z","git_url":"git://github.com/nuffe/scikit-learn.git","ssh_url":"git@github.com:nuffe/scikit-learn.git","clone_url":"https://github.com/nuffe/scikit-learn.git","svn_url":"https://github.com/nuffe/scikit-learn","homepage":"http://scikit-learn.org","size":75767,"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":"78dbcb2838bb863dcf2e930c29aeef4f4cde5949","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-10-17T12:17:13Z","pushed_at":"2016-10-17T12:44:29Z","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":125951,"stargazers_count":14092,"watchers_count":14092,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":8020,"mirror_url":null,"open_issues_count":1181,"forks":8020,"open_issues":1181,"watchers":14092,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/7591"},"html":{"href":"https://github.com/scikit-learn/scikit-learn/pull/7591"},"issue":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/7591"},"comments":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/7591/comments"},"review_comments":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/7591/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/7591/commits"},"statuses":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/statuses/3fa201b3a8493826e336a36e2496c1481b0167fd"}}}}
{"actor":{"display_login":"agramfort"}}