{"action":"opened","number":90,"pull_request":{"url":"https://api.github.com/repos/greenelab/hetmech/pulls/90","id":180411802,"html_url":"https://github.com/greenelab/hetmech/pull/90","diff_url":"https://github.com/greenelab/hetmech/pull/90.diff","patch_url":"https://github.com/greenelab/hetmech/pull/90.patch","issue_url":"https://api.github.com/repos/greenelab/hetmech/issues/90","number":90,"state":"open","locked":false,"title":"Scipy sparse vector with memory map","user":{"login":"zietzm","id":7230303,"avatar_url":"https://avatars1.githubusercontent.com/u/7230303?v=4","gravatar_id":"","url":"https://api.github.com/users/zietzm","html_url":"https://github.com/zietzm","followers_url":"https://api.github.com/users/zietzm/followers","following_url":"https://api.github.com/users/zietzm/following{/other_user}","gists_url":"https://api.github.com/users/zietzm/gists{/gist_id}","starred_url":"https://api.github.com/users/zietzm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zietzm/subscriptions","organizations_url":"https://api.github.com/users/zietzm/orgs","repos_url":"https://api.github.com/users/zietzm/repos","events_url":"https://api.github.com/users/zietzm/events{/privacy}","received_events_url":"https://api.github.com/users/zietzm/received_events","type":"User","site_admin":false},"body":"Addresses #76 \r\n\r\nUpdates [explore/matrix-io/02.sparse-and-dense.ipynb](https://github.com/greenelab/hetmech/blob/master/explore/matrix-io/02.sparse-and-dense.ipynb) to include a comparison of multiplying memory-mapped numpy arrays (which are stored on disk in `.npy` format) by various types of vectors. Specifically, adds a comparison of various `scipy.sparse` matrix formats for this task. \r\n\r\nI found these results fairly surprising, so I reran the notebook several times and found similar results each time. Different types of sparse matrices seem to be better for different tasks, though how this breaks down is a bit tricky. For example, `scipy.sparse.coo_matrix` appears to be the fastest sparse method for multiplication by the largest matrices, while CSR/CSC are basically tied for fastest among the sparse vectors for small matrices. \r\n\r\nOverall, it appears that subsetting memory-mapped matrices and multiplying by a `numpy.ones` vector is still the fastest method in most cases, and **it (subsetting) shows the biggest improvement over other methods for the largest, slowest-to-load matrices.** See [02.sparse-and-dense.ipynb](https://github.com/zietzm/hetmech/blob/1ea4175b7de26c401cdfd7999a1e25b47b7db8bd/explore/matrix-io/02.sparse-and-dense.ipynb)","created_at":"2018-04-09T20:02:43Z","updated_at":"2018-04-09T20:02:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/greenelab/hetmech/pulls/90/commits","review_comments_url":"https://api.github.com/repos/greenelab/hetmech/pulls/90/comments","review_comment_url":"https://api.github.com/repos/greenelab/hetmech/pulls/comments{/number}","comments_url":"https://api.github.com/repos/greenelab/hetmech/issues/90/comments","statuses_url":"https://api.github.com/repos/greenelab/hetmech/statuses/1ea4175b7de26c401cdfd7999a1e25b47b7db8bd","head":{"label":"zietzm:explore_sparse","ref":"explore_sparse","sha":"1ea4175b7de26c401cdfd7999a1e25b47b7db8bd","user":{"login":"zietzm","id":7230303,"avatar_url":"https://avatars1.githubusercontent.com/u/7230303?v=4","gravatar_id":"","url":"https://api.github.com/users/zietzm","html_url":"https://github.com/zietzm","followers_url":"https://api.github.com/users/zietzm/followers","following_url":"https://api.github.com/users/zietzm/following{/other_user}","gists_url":"https://api.github.com/users/zietzm/gists{/gist_id}","starred_url":"https://api.github.com/users/zietzm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zietzm/subscriptions","organizations_url":"https://api.github.com/users/zietzm/orgs","repos_url":"https://api.github.com/users/zietzm/repos","events_url":"https://api.github.com/users/zietzm/events{/privacy}","received_events_url":"https://api.github.com/users/zietzm/received_events","type":"User","site_admin":false},"repo":{"id":88914097,"name":"hetmech","full_name":"zietzm/hetmech","owner":{"login":"zietzm","id":7230303,"avatar_url":"https://avatars1.githubusercontent.com/u/7230303?v=4","gravatar_id":"","url":"https://api.github.com/users/zietzm","html_url":"https://github.com/zietzm","followers_url":"https://api.github.com/users/zietzm/followers","following_url":"https://api.github.com/users/zietzm/following{/other_user}","gists_url":"https://api.github.com/users/zietzm/gists{/gist_id}","starred_url":"https://api.github.com/users/zietzm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zietzm/subscriptions","organizations_url":"https://api.github.com/users/zietzm/orgs","repos_url":"https://api.github.com/users/zietzm/repos","events_url":"https://api.github.com/users/zietzm/events{/privacy}","received_events_url":"https://api.github.com/users/zietzm/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/zietzm/hetmech","description":"Greene Lab/Theory In Practice collaboration on identifying mechanisms using hetnets","fork":true,"url":"https://api.github.com/repos/zietzm/hetmech","forks_url":"https://api.github.com/repos/zietzm/hetmech/forks","keys_url":"https://api.github.com/repos/zietzm/hetmech/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zietzm/hetmech/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zietzm/hetmech/teams","hooks_url":"https://api.github.com/repos/zietzm/hetmech/hooks","issue_events_url":"https://api.github.com/repos/zietzm/hetmech/issues/events{/number}","events_url":"https://api.github.com/repos/zietzm/hetmech/events","assignees_url":"https://api.github.com/repos/zietzm/hetmech/assignees{/user}","branches_url":"https://api.github.com/repos/zietzm/hetmech/branches{/branch}","tags_url":"https://api.github.com/repos/zietzm/hetmech/tags","blobs_url":"https://api.github.com/repos/zietzm/hetmech/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zietzm/hetmech/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zietzm/hetmech/git/refs{/sha}","trees_url":"https://api.github.com/repos/zietzm/hetmech/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zietzm/hetmech/statuses/{sha}","languages_url":"https://api.github.com/repos/zietzm/hetmech/languages","stargazers_url":"https://api.github.com/repos/zietzm/hetmech/stargazers","contributors_url":"https://api.github.com/repos/zietzm/hetmech/contributors","subscribers_url":"https://api.github.com/repos/zietzm/hetmech/subscribers","subscription_url":"https://api.github.com/repos/zietzm/hetmech/subscription","commits_url":"https://api.github.com/repos/zietzm/hetmech/commits{/sha}","git_commits_url":"https://api.github.com/repos/zietzm/hetmech/git/commits{/sha}","comments_url":"https://api.github.com/repos/zietzm/hetmech/comments{/number}","issue_comment_url":"https://api.github.com/repos/zietzm/hetmech/issues/comments{/number}","contents_url":"https://api.github.com/repos/zietzm/hetmech/contents/{+path}","compare_url":"https://api.github.com/repos/zietzm/hetmech/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zietzm/hetmech/merges","archive_url":"https://api.github.com/repos/zietzm/hetmech/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zietzm/hetmech/downloads","issues_url":"https://api.github.com/repos/zietzm/hetmech/issues{/number}","pulls_url":"https://api.github.com/repos/zietzm/hetmech/pulls{/number}","milestones_url":"https://api.github.com/repos/zietzm/hetmech/milestones{/number}","notifications_url":"https://api.github.com/repos/zietzm/hetmech/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zietzm/hetmech/labels{/name}","releases_url":"https://api.github.com/repos/zietzm/hetmech/releases{/id}","deployments_url":"https://api.github.com/repos/zietzm/hetmech/deployments","created_at":"2017-04-20T21:59:28Z","updated_at":"2018-04-06T16:08:05Z","pushed_at":"2018-04-09T19:48:21Z","git_url":"git://github.com/zietzm/hetmech.git","ssh_url":"git@github.com:zietzm/hetmech.git","clone_url":"https://github.com/zietzm/hetmech.git","svn_url":"https://github.com/zietzm/hetmech","homepage":"","size":6618,"stargazers_count":0,"watchers_count":0,"language":"Jupyter Notebook","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":"Other","spdx_id":null,"url":null},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"greenelab:master","ref":"master","sha":"6d135267ed4ec02fec3a3d976ea8751524c49be0","user":{"login":"greenelab","id":9607754,"avatar_url":"https://avatars1.githubusercontent.com/u/9607754?v=4","gravatar_id":"","url":"https://api.github.com/users/greenelab","html_url":"https://github.com/greenelab","followers_url":"https://api.github.com/users/greenelab/followers","following_url":"https://api.github.com/users/greenelab/following{/other_user}","gists_url":"https://api.github.com/users/greenelab/gists{/gist_id}","starred_url":"https://api.github.com/users/greenelab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/greenelab/subscriptions","organizations_url":"https://api.github.com/users/greenelab/orgs","repos_url":"https://api.github.com/users/greenelab/repos","events_url":"https://api.github.com/users/greenelab/events{/privacy}","received_events_url":"https://api.github.com/users/greenelab/received_events","type":"Organization","site_admin":false},"repo":{"id":63903430,"name":"hetmech","full_name":"greenelab/hetmech","owner":{"login":"greenelab","id":9607754,"avatar_url":"https://avatars1.githubusercontent.com/u/9607754?v=4","gravatar_id":"","url":"https://api.github.com/users/greenelab","html_url":"https://github.com/greenelab","followers_url":"https://api.github.com/users/greenelab/followers","following_url":"https://api.github.com/users/greenelab/following{/other_user}","gists_url":"https://api.github.com/users/greenelab/gists{/gist_id}","starred_url":"https://api.github.com/users/greenelab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/greenelab/subscriptions","organizations_url":"https://api.github.com/users/greenelab/orgs","repos_url":"https://api.github.com/users/greenelab/repos","events_url":"https://api.github.com/users/greenelab/events{/privacy}","received_events_url":"https://api.github.com/users/greenelab/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/greenelab/hetmech","description":"A search engine for hetnets. Matrix implementations of path-count-based measures","fork":false,"url":"https://api.github.com/repos/greenelab/hetmech","forks_url":"https://api.github.com/repos/greenelab/hetmech/forks","keys_url":"https://api.github.com/repos/greenelab/hetmech/keys{/key_id}","collaborators_url":"https://api.github.com/repos/greenelab/hetmech/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/greenelab/hetmech/teams","hooks_url":"https://api.github.com/repos/greenelab/hetmech/hooks","issue_events_url":"https://api.github.com/repos/greenelab/hetmech/issues/events{/number}","events_url":"https://api.github.com/repos/greenelab/hetmech/events","assignees_url":"https://api.github.com/repos/greenelab/hetmech/assignees{/user}","branches_url":"https://api.github.com/repos/greenelab/hetmech/branches{/branch}","tags_url":"https://api.github.com/repos/greenelab/hetmech/tags","blobs_url":"https://api.github.com/repos/greenelab/hetmech/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/greenelab/hetmech/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/greenelab/hetmech/git/refs{/sha}","trees_url":"https://api.github.com/repos/greenelab/hetmech/git/trees{/sha}","statuses_url":"https://api.github.com/repos/greenelab/hetmech/statuses/{sha}","languages_url":"https://api.github.com/repos/greenelab/hetmech/languages","stargazers_url":"https://api.github.com/repos/greenelab/hetmech/stargazers","contributors_url":"https://api.github.com/repos/greenelab/hetmech/contributors","subscribers_url":"https://api.github.com/repos/greenelab/hetmech/subscribers","subscription_url":"https://api.github.com/repos/greenelab/hetmech/subscription","commits_url":"https://api.github.com/repos/greenelab/hetmech/commits{/sha}","git_commits_url":"https://api.github.com/repos/greenelab/hetmech/git/commits{/sha}","comments_url":"https://api.github.com/repos/greenelab/hetmech/comments{/number}","issue_comment_url":"https://api.github.com/repos/greenelab/hetmech/issues/comments{/number}","contents_url":"https://api.github.com/repos/greenelab/hetmech/contents/{+path}","compare_url":"https://api.github.com/repos/greenelab/hetmech/compare/{base}...{head}","merges_url":"https://api.github.com/repos/greenelab/hetmech/merges","archive_url":"https://api.github.com/repos/greenelab/hetmech/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/greenelab/hetmech/downloads","issues_url":"https://api.github.com/repos/greenelab/hetmech/issues{/number}","pulls_url":"https://api.github.com/repos/greenelab/hetmech/pulls{/number}","milestones_url":"https://api.github.com/repos/greenelab/hetmech/milestones{/number}","notifications_url":"https://api.github.com/repos/greenelab/hetmech/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/greenelab/hetmech/labels{/name}","releases_url":"https://api.github.com/repos/greenelab/hetmech/releases{/id}","deployments_url":"https://api.github.com/repos/greenelab/hetmech/deployments","created_at":"2016-07-21T21:25:53Z","updated_at":"2018-04-05T22:56:23Z","pushed_at":"2018-04-05T22:56:22Z","git_url":"git://github.com/greenelab/hetmech.git","ssh_url":"git@github.com:greenelab/hetmech.git","clone_url":"https://github.com/greenelab/hetmech.git","svn_url":"https://github.com/greenelab/hetmech","homepage":"","size":6609,"stargazers_count":4,"watchers_count":4,"language":"Jupyter Notebook","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"archived":false,"open_issues_count":11,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":5,"open_issues":11,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/greenelab/hetmech/pulls/90"},"html":{"href":"https://github.com/greenelab/hetmech/pull/90"},"issue":{"href":"https://api.github.com/repos/greenelab/hetmech/issues/90"},"comments":{"href":"https://api.github.com/repos/greenelab/hetmech/issues/90/comments"},"review_comments":{"href":"https://api.github.com/repos/greenelab/hetmech/pulls/90/comments"},"review_comment":{"href":"https://api.github.com/repos/greenelab/hetmech/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/greenelab/hetmech/pulls/90/commits"},"statuses":{"href":"https://api.github.com/repos/greenelab/hetmech/statuses/1ea4175b7de26c401cdfd7999a1e25b47b7db8bd"}},"author_association":"COLLABORATOR","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":2,"additions":402,"deletions":68,"changed_files":3}}
{"actor":{"display_login":"zietzm"}}