{"action":"created","comment":{"url":"https://api.github.com/repos/jolars/sgdnet/pulls/comments/200870476","pull_request_review_id":135262322,"id":200870476,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwMDg3MDQ3Ng==","diff_hunk":"@@ -47,68 +45,65 @@ class Family {\n     step_sizes.reserve(alpha_scaled.size());\n \n     for (auto alpha_val : alpha_scaled) {\n-      double L = L_scaling*(max_squared_sum + fit_intercept) + alpha_val;\n+      double L =\n+        L_scaling_*(max_squared_sum + static_cast<double>(fit_intercept))","path":"src/families.h","position":33,"original_position":33,"commit_id":"5eb02ca7b09d63ca2f70b5dccd1f5ca03298a92e","original_commit_id":"5eb02ca7b09d63ca2f70b5dccd1f5ca03298a92e","user":{"login":"michaelweylandt","id":1486569,"node_id":"MDQ6VXNlcjE0ODY1Njk=","avatar_url":"https://avatars1.githubusercontent.com/u/1486569?v=4","gravatar_id":"","url":"https://api.github.com/users/michaelweylandt","html_url":"https://github.com/michaelweylandt","followers_url":"https://api.github.com/users/michaelweylandt/followers","following_url":"https://api.github.com/users/michaelweylandt/following{/other_user}","gists_url":"https://api.github.com/users/michaelweylandt/gists{/gist_id}","starred_url":"https://api.github.com/users/michaelweylandt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michaelweylandt/subscriptions","organizations_url":"https://api.github.com/users/michaelweylandt/orgs","repos_url":"https://api.github.com/users/michaelweylandt/repos","events_url":"https://api.github.com/users/michaelweylandt/events{/privacy}","received_events_url":"https://api.github.com/users/michaelweylandt/received_events","type":"User","site_admin":false},"body":"Where is `fit_intercept` coming from here? It got dropped from the argument list. ","created_at":"2018-07-09T02:48:48Z","updated_at":"2018-07-09T02:56:07Z","html_url":"https://github.com/jolars/sgdnet/pull/11#discussion_r200870476","pull_request_url":"https://api.github.com/repos/jolars/sgdnet/pulls/11","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/jolars/sgdnet/pulls/comments/200870476"},"html":{"href":"https://github.com/jolars/sgdnet/pull/11#discussion_r200870476"},"pull_request":{"href":"https://api.github.com/repos/jolars/sgdnet/pulls/11"}}},"pull_request":{"url":"https://api.github.com/repos/jolars/sgdnet/pulls/11","id":199313783,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk5MzEzNzgz","html_url":"https://github.com/jolars/sgdnet/pull/11","diff_url":"https://github.com/jolars/sgdnet/pull/11.diff","patch_url":"https://github.com/jolars/sgdnet/pull/11.patch","issue_url":"https://api.github.com/repos/jolars/sgdnet/issues/11","number":11,"state":"open","locked":false,"title":"Redesigned algorithm based on DeFazio 2014","user":{"login":"jolars","id":13087841,"node_id":"MDQ6VXNlcjEzMDg3ODQx","avatar_url":"https://avatars2.githubusercontent.com/u/13087841?v=4","gravatar_id":"","url":"https://api.github.com/users/jolars","html_url":"https://github.com/jolars","followers_url":"https://api.github.com/users/jolars/followers","following_url":"https://api.github.com/users/jolars/following{/other_user}","gists_url":"https://api.github.com/users/jolars/gists{/gist_id}","starred_url":"https://api.github.com/users/jolars/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jolars/subscriptions","organizations_url":"https://api.github.com/users/jolars/orgs","repos_url":"https://api.github.com/users/jolars/repos","events_url":"https://api.github.com/users/jolars/events{/privacy}","received_events_url":"https://api.github.com/users/jolars/received_events","type":"User","site_admin":false},"body":"This pull request is the result of several attempts to optimize the implementation of the algorithm. Most of this has been cleaned up now but originally involved benchmarking both the lighting-based implementation and the original from DeFazio. In the end, the latter turned out to perform best, although it has been augmented with bits and pieces from both the lighting and scikit-learn based implementation.\r\n\r\nI have switched from Armadillo to Eigen, which lead to significant speed boosts and slight improvements in memory footprint. Here is a benchmark run similar to the one that I included with the proposal:\r\n\r\n![image](https://user-images.githubusercontent.com/13087841/42291624-23c5e126-7fcd-11e8-9786-b0f45d8064cc.png)\r\n\r\nI believe that this is close enough for most comparisons that additional optimizations in the future along with going parallel should put us ahead. One reason for why we might not reach the same speeds as in the cython-based implementations is that they use more aggressive optimization (-O3 compared to -O2, which seems to be default for R).\r\n\r\nAs you can see, however, there is still some way to go, and for computing the full path glmnet is still much faster in the L1-regularized case, probably due to the use of restricted sets via the strong rules. For L2-regression we are now very close performance-wise, however.\r\n\r\nI have also included a brief vignette with these benchmarks. The data itself is produced from a script in data-raw. I am not sure that this is a good idea by the way, so if you have advice for a better way to store the data for the vignette I am all ears.\r\n\r\nThere is still only support for the binomial and gaussian families. I'll deal with that in the next pull request.\r\n\r\n**Edit 6/7**\r\nI should also note that the domain for binomial responses has been switched to {-1, 1}.","created_at":"2018-07-04T19:28:15Z","updated_at":"2018-07-09T02:56:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"aa2dd4c6f06b5d79547798e7666b2b12879e9908","assignee":null,"assignees":[],"requested_reviewers":[{"login":"tdhock","id":932850,"node_id":"MDQ6VXNlcjkzMjg1MA==","avatar_url":"https://avatars1.githubusercontent.com/u/932850?v=4","gravatar_id":"","url":"https://api.github.com/users/tdhock","html_url":"https://github.com/tdhock","followers_url":"https://api.github.com/users/tdhock/followers","following_url":"https://api.github.com/users/tdhock/following{/other_user}","gists_url":"https://api.github.com/users/tdhock/gists{/gist_id}","starred_url":"https://api.github.com/users/tdhock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tdhock/subscriptions","organizations_url":"https://api.github.com/users/tdhock/orgs","repos_url":"https://api.github.com/users/tdhock/repos","events_url":"https://api.github.com/users/tdhock/events{/privacy}","received_events_url":"https://api.github.com/users/tdhock/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":958569512,"node_id":"MDU6TGFiZWw5NTg1Njk1MTI=","url":"https://api.github.com/repos/jolars/sgdnet/labels/optimization","name":"optimization","color":"e86e63","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/jolars/sgdnet/pulls/11/commits","review_comments_url":"https://api.github.com/repos/jolars/sgdnet/pulls/11/comments","review_comment_url":"https://api.github.com/repos/jolars/sgdnet/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jolars/sgdnet/issues/11/comments","statuses_url":"https://api.github.com/repos/jolars/sgdnet/statuses/5eb02ca7b09d63ca2f70b5dccd1f5ca03298a92e","head":{"label":"jolars:original-saga","ref":"original-saga","sha":"5eb02ca7b09d63ca2f70b5dccd1f5ca03298a92e","user":{"login":"jolars","id":13087841,"node_id":"MDQ6VXNlcjEzMDg3ODQx","avatar_url":"https://avatars2.githubusercontent.com/u/13087841?v=4","gravatar_id":"","url":"https://api.github.com/users/jolars","html_url":"https://github.com/jolars","followers_url":"https://api.github.com/users/jolars/followers","following_url":"https://api.github.com/users/jolars/following{/other_user}","gists_url":"https://api.github.com/users/jolars/gists{/gist_id}","starred_url":"https://api.github.com/users/jolars/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jolars/subscriptions","organizations_url":"https://api.github.com/users/jolars/orgs","repos_url":"https://api.github.com/users/jolars/repos","events_url":"https://api.github.com/users/jolars/events{/privacy}","received_events_url":"https://api.github.com/users/jolars/received_events","type":"User","site_admin":false},"repo":{"id":133777699,"node_id":"MDEwOlJlcG9zaXRvcnkxMzM3Nzc2OTk=","name":"sgdnet","full_name":"jolars/sgdnet","owner":{"login":"jolars","id":13087841,"node_id":"MDQ6VXNlcjEzMDg3ODQx","avatar_url":"https://avatars2.githubusercontent.com/u/13087841?v=4","gravatar_id":"","url":"https://api.github.com/users/jolars","html_url":"https://github.com/jolars","followers_url":"https://api.github.com/users/jolars/followers","following_url":"https://api.github.com/users/jolars/following{/other_user}","gists_url":"https://api.github.com/users/jolars/gists{/gist_id}","starred_url":"https://api.github.com/users/jolars/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jolars/subscriptions","organizations_url":"https://api.github.com/users/jolars/orgs","repos_url":"https://api.github.com/users/jolars/repos","events_url":"https://api.github.com/users/jolars/events{/privacy}","received_events_url":"https://api.github.com/users/jolars/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jolars/sgdnet","description":"Fast Sparse Linear Models for Big Data with SAGA","fork":false,"url":"https://api.github.com/repos/jolars/sgdnet","forks_url":"https://api.github.com/repos/jolars/sgdnet/forks","keys_url":"https://api.github.com/repos/jolars/sgdnet/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jolars/sgdnet/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jolars/sgdnet/teams","hooks_url":"https://api.github.com/repos/jolars/sgdnet/hooks","issue_events_url":"https://api.github.com/repos/jolars/sgdnet/issues/events{/number}","events_url":"https://api.github.com/repos/jolars/sgdnet/events","assignees_url":"https://api.github.com/repos/jolars/sgdnet/assignees{/user}","branches_url":"https://api.github.com/repos/jolars/sgdnet/branches{/branch}","tags_url":"https://api.github.com/repos/jolars/sgdnet/tags","blobs_url":"https://api.github.com/repos/jolars/sgdnet/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jolars/sgdnet/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jolars/sgdnet/git/refs{/sha}","trees_url":"https://api.github.com/repos/jolars/sgdnet/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jolars/sgdnet/statuses/{sha}","languages_url":"https://api.github.com/repos/jolars/sgdnet/languages","stargazers_url":"https://api.github.com/repos/jolars/sgdnet/stargazers","contributors_url":"https://api.github.com/repos/jolars/sgdnet/contributors","subscribers_url":"https://api.github.com/repos/jolars/sgdnet/subscribers","subscription_url":"https://api.github.com/repos/jolars/sgdnet/subscription","commits_url":"https://api.github.com/repos/jolars/sgdnet/commits{/sha}","git_commits_url":"https://api.github.com/repos/jolars/sgdnet/git/commits{/sha}","comments_url":"https://api.github.com/repos/jolars/sgdnet/comments{/number}","issue_comment_url":"https://api.github.com/repos/jolars/sgdnet/issues/comments{/number}","contents_url":"https://api.github.com/repos/jolars/sgdnet/contents/{+path}","compare_url":"https://api.github.com/repos/jolars/sgdnet/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jolars/sgdnet/merges","archive_url":"https://api.github.com/repos/jolars/sgdnet/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jolars/sgdnet/downloads","issues_url":"https://api.github.com/repos/jolars/sgdnet/issues{/number}","pulls_url":"https://api.github.com/repos/jolars/sgdnet/pulls{/number}","milestones_url":"https://api.github.com/repos/jolars/sgdnet/milestones{/number}","notifications_url":"https://api.github.com/repos/jolars/sgdnet/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jolars/sgdnet/labels{/name}","releases_url":"https://api.github.com/repos/jolars/sgdnet/releases{/id}","deployments_url":"https://api.github.com/repos/jolars/sgdnet/deployments","created_at":"2018-05-17T07:43:20Z","updated_at":"2018-07-04T17:11:36Z","pushed_at":"2018-07-06T11:03:58Z","git_url":"git://github.com/jolars/sgdnet.git","ssh_url":"git@github.com:jolars/sgdnet.git","clone_url":"https://github.com/jolars/sgdnet.git","svn_url":"https://github.com/jolars/sgdnet","homepage":null,"size":339,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":5,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":0,"open_issues":5,"watchers":0,"default_branch":"master"}},"base":{"label":"jolars:master","ref":"master","sha":"744f1ce3f65c718617f2c183d18ffff52b016c2d","user":{"login":"jolars","id":13087841,"node_id":"MDQ6VXNlcjEzMDg3ODQx","avatar_url":"https://avatars2.githubusercontent.com/u/13087841?v=4","gravatar_id":"","url":"https://api.github.com/users/jolars","html_url":"https://github.com/jolars","followers_url":"https://api.github.com/users/jolars/followers","following_url":"https://api.github.com/users/jolars/following{/other_user}","gists_url":"https://api.github.com/users/jolars/gists{/gist_id}","starred_url":"https://api.github.com/users/jolars/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jolars/subscriptions","organizations_url":"https://api.github.com/users/jolars/orgs","repos_url":"https://api.github.com/users/jolars/repos","events_url":"https://api.github.com/users/jolars/events{/privacy}","received_events_url":"https://api.github.com/users/jolars/received_events","type":"User","site_admin":false},"repo":{"id":133777699,"node_id":"MDEwOlJlcG9zaXRvcnkxMzM3Nzc2OTk=","name":"sgdnet","full_name":"jolars/sgdnet","owner":{"login":"jolars","id":13087841,"node_id":"MDQ6VXNlcjEzMDg3ODQx","avatar_url":"https://avatars2.githubusercontent.com/u/13087841?v=4","gravatar_id":"","url":"https://api.github.com/users/jolars","html_url":"https://github.com/jolars","followers_url":"https://api.github.com/users/jolars/followers","following_url":"https://api.github.com/users/jolars/following{/other_user}","gists_url":"https://api.github.com/users/jolars/gists{/gist_id}","starred_url":"https://api.github.com/users/jolars/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jolars/subscriptions","organizations_url":"https://api.github.com/users/jolars/orgs","repos_url":"https://api.github.com/users/jolars/repos","events_url":"https://api.github.com/users/jolars/events{/privacy}","received_events_url":"https://api.github.com/users/jolars/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jolars/sgdnet","description":"Fast Sparse Linear Models for Big Data with SAGA","fork":false,"url":"https://api.github.com/repos/jolars/sgdnet","forks_url":"https://api.github.com/repos/jolars/sgdnet/forks","keys_url":"https://api.github.com/repos/jolars/sgdnet/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jolars/sgdnet/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jolars/sgdnet/teams","hooks_url":"https://api.github.com/repos/jolars/sgdnet/hooks","issue_events_url":"https://api.github.com/repos/jolars/sgdnet/issues/events{/number}","events_url":"https://api.github.com/repos/jolars/sgdnet/events","assignees_url":"https://api.github.com/repos/jolars/sgdnet/assignees{/user}","branches_url":"https://api.github.com/repos/jolars/sgdnet/branches{/branch}","tags_url":"https://api.github.com/repos/jolars/sgdnet/tags","blobs_url":"https://api.github.com/repos/jolars/sgdnet/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jolars/sgdnet/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jolars/sgdnet/git/refs{/sha}","trees_url":"https://api.github.com/repos/jolars/sgdnet/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jolars/sgdnet/statuses/{sha}","languages_url":"https://api.github.com/repos/jolars/sgdnet/languages","stargazers_url":"https://api.github.com/repos/jolars/sgdnet/stargazers","contributors_url":"https://api.github.com/repos/jolars/sgdnet/contributors","subscribers_url":"https://api.github.com/repos/jolars/sgdnet/subscribers","subscription_url":"https://api.github.com/repos/jolars/sgdnet/subscription","commits_url":"https://api.github.com/repos/jolars/sgdnet/commits{/sha}","git_commits_url":"https://api.github.com/repos/jolars/sgdnet/git/commits{/sha}","comments_url":"https://api.github.com/repos/jolars/sgdnet/comments{/number}","issue_comment_url":"https://api.github.com/repos/jolars/sgdnet/issues/comments{/number}","contents_url":"https://api.github.com/repos/jolars/sgdnet/contents/{+path}","compare_url":"https://api.github.com/repos/jolars/sgdnet/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jolars/sgdnet/merges","archive_url":"https://api.github.com/repos/jolars/sgdnet/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jolars/sgdnet/downloads","issues_url":"https://api.github.com/repos/jolars/sgdnet/issues{/number}","pulls_url":"https://api.github.com/repos/jolars/sgdnet/pulls{/number}","milestones_url":"https://api.github.com/repos/jolars/sgdnet/milestones{/number}","notifications_url":"https://api.github.com/repos/jolars/sgdnet/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jolars/sgdnet/labels{/name}","releases_url":"https://api.github.com/repos/jolars/sgdnet/releases{/id}","deployments_url":"https://api.github.com/repos/jolars/sgdnet/deployments","created_at":"2018-05-17T07:43:20Z","updated_at":"2018-07-04T17:11:36Z","pushed_at":"2018-07-06T11:03:58Z","git_url":"git://github.com/jolars/sgdnet.git","ssh_url":"git@github.com:jolars/sgdnet.git","clone_url":"https://github.com/jolars/sgdnet.git","svn_url":"https://github.com/jolars/sgdnet","homepage":null,"size":339,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":5,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":0,"open_issues":5,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jolars/sgdnet/pulls/11"},"html":{"href":"https://github.com/jolars/sgdnet/pull/11"},"issue":{"href":"https://api.github.com/repos/jolars/sgdnet/issues/11"},"comments":{"href":"https://api.github.com/repos/jolars/sgdnet/issues/11/comments"},"review_comments":{"href":"https://api.github.com/repos/jolars/sgdnet/pulls/11/comments"},"review_comment":{"href":"https://api.github.com/repos/jolars/sgdnet/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jolars/sgdnet/pulls/11/commits"},"statuses":{"href":"https://api.github.com/repos/jolars/sgdnet/statuses/5eb02ca7b09d63ca2f70b5dccd1f5ca03298a92e"}},"author_association":"OWNER"}}
{"actor":{"display_login":"michaelweylandt"}}