{"action":"created","comment":{"url":"https://api.github.com/repos/scikit-learn-contrib/lightning/pulls/comments/61687598","id":61687598,"diff_hunk":"@@ -322,14 +322,16 @@ def _sag_fit(self,\n                     # compute the norm if not done already\n                     for j in range(n_nz):\n                         square_norm_X[i] += (data[j] * data[j])\n-                a = loss.loss(y_pred - g[i] * square_norm_X[i] / lipschitz, y[i])\n-                b = loss.loss(y_pred, y[i]) - 0.5 * square_norm_X[i] * (g[i] * g[i]) / lipschitz\n-                if a <= b :\n-                    # condition is satisfied, decrease Lipschitz constant\n-                    lipschitz /= line_search_scaling\n-                else:\n-                    # condition not satisfied, decrease step size\n-                    lipschitz *= 2.0\n+                while True:","path":"lightning/impl/sag_fast.pyx","position":12,"original_position":12,"commit_id":"a4c3a62f7739dd4666fbac840e31150166322d5d","original_commit_id":"a4c3a62f7739dd4666fbac840e31150166322d5d","user":{"login":"mblondel","id":233706,"avatar_url":"https://avatars.githubusercontent.com/u/233706?v=3","gravatar_id":"","url":"https://api.github.com/users/mblondel","html_url":"https://github.com/mblondel","followers_url":"https://api.github.com/users/mblondel/followers","following_url":"https://api.github.com/users/mblondel/following{/other_user}","gists_url":"https://api.github.com/users/mblondel/gists{/gist_id}","starred_url":"https://api.github.com/users/mblondel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mblondel/subscriptions","organizations_url":"https://api.github.com/users/mblondel/orgs","repos_url":"https://api.github.com/users/mblondel/repos","events_url":"https://api.github.com/users/mblondel/events{/privacy}","received_events_url":"https://api.github.com/users/mblondel/received_events","type":"User","site_admin":false},"body":"I would set a max number of iterations for safety.\r\n\r\nSo, why did you decide to implement a loop in the end?","created_at":"2016-05-01T14:13:28Z","updated_at":"2016-05-01T14:13:28Z","html_url":"https://github.com/scikit-learn-contrib/lightning/pull/76#discussion_r61687598","pull_request_url":"https://api.github.com/repos/scikit-learn-contrib/lightning/pulls/76","_links":{"self":{"href":"https://api.github.com/repos/scikit-learn-contrib/lightning/pulls/comments/61687598"},"html":{"href":"https://github.com/scikit-learn-contrib/lightning/pull/76#discussion_r61687598"},"pull_request":{"href":"https://api.github.com/repos/scikit-learn-contrib/lightning/pulls/76"}}},"pull_request":{"url":"https://api.github.com/repos/scikit-learn-contrib/lightning/pulls/76","id":68495931,"html_url":"https://github.com/scikit-learn-contrib/lightning/pull/76","diff_url":"https://github.com/scikit-learn-contrib/lightning/pull/76.diff","patch_url":"https://github.com/scikit-learn-contrib/lightning/pull/76.patch","issue_url":"https://api.github.com/repos/scikit-learn-contrib/lightning/issues/76","number":76,"state":"open","locked":false,"title":"Perform line-search inside a while loop to ensure that the criterion is always met.","user":{"login":"fabianp","id":277639,"avatar_url":"https://avatars.githubusercontent.com/u/277639?v=3","gravatar_id":"","url":"https://api.github.com/users/fabianp","html_url":"https://github.com/fabianp","followers_url":"https://api.github.com/users/fabianp/followers","following_url":"https://api.github.com/users/fabianp/following{/other_user}","gists_url":"https://api.github.com/users/fabianp/gists{/gist_id}","starred_url":"https://api.github.com/users/fabianp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fabianp/subscriptions","organizations_url":"https://api.github.com/users/fabianp/orgs","repos_url":"https://api.github.com/users/fabianp/repos","events_url":"https://api.github.com/users/fabianp/events{/privacy}","received_events_url":"https://api.github.com/users/fabianp/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-05-01T13:26:18Z","updated_at":"2016-05-01T14:13:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7f63be0be64059421188a1da2cc097e494dc11b5","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/scikit-learn-contrib/lightning/pulls/76/commits","review_comments_url":"https://api.github.com/repos/scikit-learn-contrib/lightning/pulls/76/comments","review_comment_url":"https://api.github.com/repos/scikit-learn-contrib/lightning/pulls/comments{/number}","comments_url":"https://api.github.com/repos/scikit-learn-contrib/lightning/issues/76/comments","statuses_url":"https://api.github.com/repos/scikit-learn-contrib/lightning/statuses/a4c3a62f7739dd4666fbac840e31150166322d5d","head":{"label":"fabianp:linesearch_fix","ref":"linesearch_fix","sha":"a4c3a62f7739dd4666fbac840e31150166322d5d","user":{"login":"fabianp","id":277639,"avatar_url":"https://avatars.githubusercontent.com/u/277639?v=3","gravatar_id":"","url":"https://api.github.com/users/fabianp","html_url":"https://github.com/fabianp","followers_url":"https://api.github.com/users/fabianp/followers","following_url":"https://api.github.com/users/fabianp/following{/other_user}","gists_url":"https://api.github.com/users/fabianp/gists{/gist_id}","starred_url":"https://api.github.com/users/fabianp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fabianp/subscriptions","organizations_url":"https://api.github.com/users/fabianp/orgs","repos_url":"https://api.github.com/users/fabianp/repos","events_url":"https://api.github.com/users/fabianp/events{/privacy}","received_events_url":"https://api.github.com/users/fabianp/received_events","type":"User","site_admin":false},"repo":{"id":42057006,"name":"lightning","full_name":"fabianp/lightning","owner":{"login":"fabianp","id":277639,"avatar_url":"https://avatars.githubusercontent.com/u/277639?v=3","gravatar_id":"","url":"https://api.github.com/users/fabianp","html_url":"https://github.com/fabianp","followers_url":"https://api.github.com/users/fabianp/followers","following_url":"https://api.github.com/users/fabianp/following{/other_user}","gists_url":"https://api.github.com/users/fabianp/gists{/gist_id}","starred_url":"https://api.github.com/users/fabianp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fabianp/subscriptions","organizations_url":"https://api.github.com/users/fabianp/orgs","repos_url":"https://api.github.com/users/fabianp/repos","events_url":"https://api.github.com/users/fabianp/events{/privacy}","received_events_url":"https://api.github.com/users/fabianp/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/fabianp/lightning","description":"Large-scale linear classification, regression and ranking in Python","fork":true,"url":"https://api.github.com/repos/fabianp/lightning","forks_url":"https://api.github.com/repos/fabianp/lightning/forks","keys_url":"https://api.github.com/repos/fabianp/lightning/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fabianp/lightning/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fabianp/lightning/teams","hooks_url":"https://api.github.com/repos/fabianp/lightning/hooks","issue_events_url":"https://api.github.com/repos/fabianp/lightning/issues/events{/number}","events_url":"https://api.github.com/repos/fabianp/lightning/events","assignees_url":"https://api.github.com/repos/fabianp/lightning/assignees{/user}","branches_url":"https://api.github.com/repos/fabianp/lightning/branches{/branch}","tags_url":"https://api.github.com/repos/fabianp/lightning/tags","blobs_url":"https://api.github.com/repos/fabianp/lightning/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fabianp/lightning/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fabianp/lightning/git/refs{/sha}","trees_url":"https://api.github.com/repos/fabianp/lightning/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fabianp/lightning/statuses/{sha}","languages_url":"https://api.github.com/repos/fabianp/lightning/languages","stargazers_url":"https://api.github.com/repos/fabianp/lightning/stargazers","contributors_url":"https://api.github.com/repos/fabianp/lightning/contributors","subscribers_url":"https://api.github.com/repos/fabianp/lightning/subscribers","subscription_url":"https://api.github.com/repos/fabianp/lightning/subscription","commits_url":"https://api.github.com/repos/fabianp/lightning/commits{/sha}","git_commits_url":"https://api.github.com/repos/fabianp/lightning/git/commits{/sha}","comments_url":"https://api.github.com/repos/fabianp/lightning/comments{/number}","issue_comment_url":"https://api.github.com/repos/fabianp/lightning/issues/comments{/number}","contents_url":"https://api.github.com/repos/fabianp/lightning/contents/{+path}","compare_url":"https://api.github.com/repos/fabianp/lightning/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fabianp/lightning/merges","archive_url":"https://api.github.com/repos/fabianp/lightning/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fabianp/lightning/downloads","issues_url":"https://api.github.com/repos/fabianp/lightning/issues{/number}","pulls_url":"https://api.github.com/repos/fabianp/lightning/pulls{/number}","milestones_url":"https://api.github.com/repos/fabianp/lightning/milestones{/number}","notifications_url":"https://api.github.com/repos/fabianp/lightning/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fabianp/lightning/labels{/name}","releases_url":"https://api.github.com/repos/fabianp/lightning/releases{/id}","deployments_url":"https://api.github.com/repos/fabianp/lightning/deployments","created_at":"2015-09-07T14:21:03Z","updated_at":"2016-01-12T07:06:26Z","pushed_at":"2016-05-01T13:25:42Z","git_url":"git://github.com/fabianp/lightning.git","ssh_url":"git@github.com:fabianp/lightning.git","clone_url":"https://github.com/fabianp/lightning.git","svn_url":"https://github.com/fabianp/lightning","homepage":"http://www.mblondel.org/lightning/","size":2989,"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-contrib:master","ref":"master","sha":"97231bb254dc78405dcd2c1becea2b01bb69e6db","user":{"login":"scikit-learn-contrib","id":17349883,"avatar_url":"https://avatars.githubusercontent.com/u/17349883?v=3","gravatar_id":"","url":"https://api.github.com/users/scikit-learn-contrib","html_url":"https://github.com/scikit-learn-contrib","followers_url":"https://api.github.com/users/scikit-learn-contrib/followers","following_url":"https://api.github.com/users/scikit-learn-contrib/following{/other_user}","gists_url":"https://api.github.com/users/scikit-learn-contrib/gists{/gist_id}","starred_url":"https://api.github.com/users/scikit-learn-contrib/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scikit-learn-contrib/subscriptions","organizations_url":"https://api.github.com/users/scikit-learn-contrib/orgs","repos_url":"https://api.github.com/users/scikit-learn-contrib/repos","events_url":"https://api.github.com/users/scikit-learn-contrib/events{/privacy}","received_events_url":"https://api.github.com/users/scikit-learn-contrib/received_events","type":"Organization","site_admin":false},"repo":{"id":3153959,"name":"lightning","full_name":"scikit-learn-contrib/lightning","owner":{"login":"scikit-learn-contrib","id":17349883,"avatar_url":"https://avatars.githubusercontent.com/u/17349883?v=3","gravatar_id":"","url":"https://api.github.com/users/scikit-learn-contrib","html_url":"https://github.com/scikit-learn-contrib","followers_url":"https://api.github.com/users/scikit-learn-contrib/followers","following_url":"https://api.github.com/users/scikit-learn-contrib/following{/other_user}","gists_url":"https://api.github.com/users/scikit-learn-contrib/gists{/gist_id}","starred_url":"https://api.github.com/users/scikit-learn-contrib/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scikit-learn-contrib/subscriptions","organizations_url":"https://api.github.com/users/scikit-learn-contrib/orgs","repos_url":"https://api.github.com/users/scikit-learn-contrib/repos","events_url":"https://api.github.com/users/scikit-learn-contrib/events{/privacy}","received_events_url":"https://api.github.com/users/scikit-learn-contrib/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/scikit-learn-contrib/lightning","description":"Large-scale linear classification, regression and ranking in Python","fork":false,"url":"https://api.github.com/repos/scikit-learn-contrib/lightning","forks_url":"https://api.github.com/repos/scikit-learn-contrib/lightning/forks","keys_url":"https://api.github.com/repos/scikit-learn-contrib/lightning/keys{/key_id}","collaborators_url":"https://api.github.com/repos/scikit-learn-contrib/lightning/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/scikit-learn-contrib/lightning/teams","hooks_url":"https://api.github.com/repos/scikit-learn-contrib/lightning/hooks","issue_events_url":"https://api.github.com/repos/scikit-learn-contrib/lightning/issues/events{/number}","events_url":"https://api.github.com/repos/scikit-learn-contrib/lightning/events","assignees_url":"https://api.github.com/repos/scikit-learn-contrib/lightning/assignees{/user}","branches_url":"https://api.github.com/repos/scikit-learn-contrib/lightning/branches{/branch}","tags_url":"https://api.github.com/repos/scikit-learn-contrib/lightning/tags","blobs_url":"https://api.github.com/repos/scikit-learn-contrib/lightning/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/scikit-learn-contrib/lightning/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/scikit-learn-contrib/lightning/git/refs{/sha}","trees_url":"https://api.github.com/repos/scikit-learn-contrib/lightning/git/trees{/sha}","statuses_url":"https://api.github.com/repos/scikit-learn-contrib/lightning/statuses/{sha}","languages_url":"https://api.github.com/repos/scikit-learn-contrib/lightning/languages","stargazers_url":"https://api.github.com/repos/scikit-learn-contrib/lightning/stargazers","contributors_url":"https://api.github.com/repos/scikit-learn-contrib/lightning/contributors","subscribers_url":"https://api.github.com/repos/scikit-learn-contrib/lightning/subscribers","subscription_url":"https://api.github.com/repos/scikit-learn-contrib/lightning/subscription","commits_url":"https://api.github.com/repos/scikit-learn-contrib/lightning/commits{/sha}","git_commits_url":"https://api.github.com/repos/scikit-learn-contrib/lightning/git/commits{/sha}","comments_url":"https://api.github.com/repos/scikit-learn-contrib/lightning/comments{/number}","issue_comment_url":"https://api.github.com/repos/scikit-learn-contrib/lightning/issues/comments{/number}","contents_url":"https://api.github.com/repos/scikit-learn-contrib/lightning/contents/{+path}","compare_url":"https://api.github.com/repos/scikit-learn-contrib/lightning/compare/{base}...{head}","merges_url":"https://api.github.com/repos/scikit-learn-contrib/lightning/merges","archive_url":"https://api.github.com/repos/scikit-learn-contrib/lightning/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/scikit-learn-contrib/lightning/downloads","issues_url":"https://api.github.com/repos/scikit-learn-contrib/lightning/issues{/number}","pulls_url":"https://api.github.com/repos/scikit-learn-contrib/lightning/pulls{/number}","milestones_url":"https://api.github.com/repos/scikit-learn-contrib/lightning/milestones{/number}","notifications_url":"https://api.github.com/repos/scikit-learn-contrib/lightning/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/scikit-learn-contrib/lightning/labels{/name}","releases_url":"https://api.github.com/repos/scikit-learn-contrib/lightning/releases{/id}","deployments_url":"https://api.github.com/repos/scikit-learn-contrib/lightning/deployments","created_at":"2012-01-11T13:53:52Z","updated_at":"2016-04-29T03:24:33Z","pushed_at":"2016-05-01T13:29:26Z","git_url":"git://github.com/scikit-learn-contrib/lightning.git","ssh_url":"git@github.com:scikit-learn-contrib/lightning.git","clone_url":"https://github.com/scikit-learn-contrib/lightning.git","svn_url":"https://github.com/scikit-learn-contrib/lightning","homepage":"http://contrib.scikit-learn.org/lightning/","size":2997,"stargazers_count":257,"watchers_count":257,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":51,"mirror_url":null,"open_issues_count":23,"forks":51,"open_issues":23,"watchers":257,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/scikit-learn-contrib/lightning/pulls/76"},"html":{"href":"https://github.com/scikit-learn-contrib/lightning/pull/76"},"issue":{"href":"https://api.github.com/repos/scikit-learn-contrib/lightning/issues/76"},"comments":{"href":"https://api.github.com/repos/scikit-learn-contrib/lightning/issues/76/comments"},"review_comments":{"href":"https://api.github.com/repos/scikit-learn-contrib/lightning/pulls/76/comments"},"review_comment":{"href":"https://api.github.com/repos/scikit-learn-contrib/lightning/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/scikit-learn-contrib/lightning/pulls/76/commits"},"statuses":{"href":"https://api.github.com/repos/scikit-learn-contrib/lightning/statuses/a4c3a62f7739dd4666fbac840e31150166322d5d"}}}}