{"action":"created","comment":{"url":"https://api.github.com/repos/elfi-dev/elfi/pulls/comments/123159006","pull_request_review_id":45333431,"id":123159006,"diff_hunk":"@@ -0,0 +1,233 @@\n+\"\"\"\n+Post-processing for posterior approximations from other ABC algorithms.\n+\n+See the review paper:\n+\n+Fundamentals and Recent Developments in Approximate Bayesian Computation\n+Lintusaari et. al\n+Syst Biol (2017) 66 (1): e66-e82.\n+https://doi.org/10.1093/sysbio/syw077\n+\n+for more information.\n+\"\"\"\n+\n+from sklearn.linear_model import LinearRegression\n+import numpy as np\n+\n+from . import results\n+\n+\n+__all__ = ('LinearAdjustment', 'adjust_posterior')","path":"elfi/methods/post_processing.py","position":20,"original_position":20,"commit_id":"1a4ba75a265015adef4bbad4347099813fb6b2e3","original_commit_id":"1a4ba75a265015adef4bbad4347099813fb6b2e3","user":{"login":"lintusj1","id":22339859,"avatar_url":"https://avatars1.githubusercontent.com/u/22339859?v=3","gravatar_id":"","url":"https://api.github.com/users/lintusj1","html_url":"https://github.com/lintusj1","followers_url":"https://api.github.com/users/lintusj1/followers","following_url":"https://api.github.com/users/lintusj1/following{/other_user}","gists_url":"https://api.github.com/users/lintusj1/gists{/gist_id}","starred_url":"https://api.github.com/users/lintusj1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lintusj1/subscriptions","organizations_url":"https://api.github.com/users/lintusj1/orgs","repos_url":"https://api.github.com/users/lintusj1/repos","events_url":"https://api.github.com/users/lintusj1/events{/privacy}","received_events_url":"https://api.github.com/users/lintusj1/received_events","type":"User","site_admin":false},"body":"The namespace directly under `elfi` should in essence only contain methods that users use directly. You can put the `LinearAdjustment` under e.g. `elfi.post_processing` module. Would be nice if you could specify strings as optional way to specify the method, for this e.g. just 'linear', since it's a very well known and common method.","created_at":"2017-06-21T05:52:36Z","updated_at":"2017-06-21T05:52:36Z","html_url":"https://github.com/elfi-dev/elfi/pull/175#discussion_r123159006","pull_request_url":"https://api.github.com/repos/elfi-dev/elfi/pulls/175","_links":{"self":{"href":"https://api.github.com/repos/elfi-dev/elfi/pulls/comments/123159006"},"html":{"href":"https://github.com/elfi-dev/elfi/pull/175#discussion_r123159006"},"pull_request":{"href":"https://api.github.com/repos/elfi-dev/elfi/pulls/175"}}},"pull_request":{"url":"https://api.github.com/repos/elfi-dev/elfi/pulls/175","id":125806125,"html_url":"https://github.com/elfi-dev/elfi/pull/175","diff_url":"https://github.com/elfi-dev/elfi/pull/175.diff","patch_url":"https://github.com/elfi-dev/elfi/pull/175.patch","issue_url":"https://api.github.com/repos/elfi-dev/elfi/issues/175","number":175,"state":"open","locked":false,"title":"Add linear regression adjustment","user":{"login":"kskyten","id":4163878,"avatar_url":"https://avatars3.githubusercontent.com/u/4163878?v=3","gravatar_id":"","url":"https://api.github.com/users/kskyten","html_url":"https://github.com/kskyten","followers_url":"https://api.github.com/users/kskyten/followers","following_url":"https://api.github.com/users/kskyten/following{/other_user}","gists_url":"https://api.github.com/users/kskyten/gists{/gist_id}","starred_url":"https://api.github.com/users/kskyten/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kskyten/subscriptions","organizations_url":"https://api.github.com/users/kskyten/orgs","repos_url":"https://api.github.com/users/kskyten/repos","events_url":"https://api.github.com/users/kskyten/events{/privacy}","received_events_url":"https://api.github.com/users/kskyten/received_events","type":"User","site_admin":false},"body":"#### Summary:\r\nAdds post processing for results obtained from other ABC algorithms.\r\n\r\n#### How to Verify:\r\nI added two regression test that check the results are the same as\r\n[here](https://github.com/kskyten/elfi-notebooks/blob/regression_adjustment/ELFI_regression_adjustment.ipynb). The tests pass locally, but I'm not sure how to get them working on travis as they depend on the bdm binary in the examples.\r\n\r\n#### Successful inference in current Notebook examples:\r\nSee this [notebook](https://github.com/kskyten/elfi-notebooks/blob/regression_adjustment/ELFI_regression_adjustment.ipynb).\r\n","created_at":"2017-06-15T12:04:22Z","updated_at":"2017-06-21T05:52:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"93023e8944be36523b2c22e31531f061898e9a2f","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/elfi-dev/elfi/pulls/175/commits","review_comments_url":"https://api.github.com/repos/elfi-dev/elfi/pulls/175/comments","review_comment_url":"https://api.github.com/repos/elfi-dev/elfi/pulls/comments{/number}","comments_url":"https://api.github.com/repos/elfi-dev/elfi/issues/175/comments","statuses_url":"https://api.github.com/repos/elfi-dev/elfi/statuses/1a4ba75a265015adef4bbad4347099813fb6b2e3","head":{"label":"elfi-dev:post_processing","ref":"post_processing","sha":"1a4ba75a265015adef4bbad4347099813fb6b2e3","user":{"login":"elfi-dev","id":24249379,"avatar_url":"https://avatars0.githubusercontent.com/u/24249379?v=3","gravatar_id":"","url":"https://api.github.com/users/elfi-dev","html_url":"https://github.com/elfi-dev","followers_url":"https://api.github.com/users/elfi-dev/followers","following_url":"https://api.github.com/users/elfi-dev/following{/other_user}","gists_url":"https://api.github.com/users/elfi-dev/gists{/gist_id}","starred_url":"https://api.github.com/users/elfi-dev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elfi-dev/subscriptions","organizations_url":"https://api.github.com/users/elfi-dev/orgs","repos_url":"https://api.github.com/users/elfi-dev/repos","events_url":"https://api.github.com/users/elfi-dev/events{/privacy}","received_events_url":"https://api.github.com/users/elfi-dev/received_events","type":"Organization","site_admin":false},"repo":{"id":69855441,"name":"elfi","full_name":"elfi-dev/elfi","owner":{"login":"elfi-dev","id":24249379,"avatar_url":"https://avatars0.githubusercontent.com/u/24249379?v=3","gravatar_id":"","url":"https://api.github.com/users/elfi-dev","html_url":"https://github.com/elfi-dev","followers_url":"https://api.github.com/users/elfi-dev/followers","following_url":"https://api.github.com/users/elfi-dev/following{/other_user}","gists_url":"https://api.github.com/users/elfi-dev/gists{/gist_id}","starred_url":"https://api.github.com/users/elfi-dev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elfi-dev/subscriptions","organizations_url":"https://api.github.com/users/elfi-dev/orgs","repos_url":"https://api.github.com/users/elfi-dev/repos","events_url":"https://api.github.com/users/elfi-dev/events{/privacy}","received_events_url":"https://api.github.com/users/elfi-dev/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/elfi-dev/elfi","description":"ELFI - Engine for Likelihood-Free Inference","fork":false,"url":"https://api.github.com/repos/elfi-dev/elfi","forks_url":"https://api.github.com/repos/elfi-dev/elfi/forks","keys_url":"https://api.github.com/repos/elfi-dev/elfi/keys{/key_id}","collaborators_url":"https://api.github.com/repos/elfi-dev/elfi/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/elfi-dev/elfi/teams","hooks_url":"https://api.github.com/repos/elfi-dev/elfi/hooks","issue_events_url":"https://api.github.com/repos/elfi-dev/elfi/issues/events{/number}","events_url":"https://api.github.com/repos/elfi-dev/elfi/events","assignees_url":"https://api.github.com/repos/elfi-dev/elfi/assignees{/user}","branches_url":"https://api.github.com/repos/elfi-dev/elfi/branches{/branch}","tags_url":"https://api.github.com/repos/elfi-dev/elfi/tags","blobs_url":"https://api.github.com/repos/elfi-dev/elfi/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/elfi-dev/elfi/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/elfi-dev/elfi/git/refs{/sha}","trees_url":"https://api.github.com/repos/elfi-dev/elfi/git/trees{/sha}","statuses_url":"https://api.github.com/repos/elfi-dev/elfi/statuses/{sha}","languages_url":"https://api.github.com/repos/elfi-dev/elfi/languages","stargazers_url":"https://api.github.com/repos/elfi-dev/elfi/stargazers","contributors_url":"https://api.github.com/repos/elfi-dev/elfi/contributors","subscribers_url":"https://api.github.com/repos/elfi-dev/elfi/subscribers","subscription_url":"https://api.github.com/repos/elfi-dev/elfi/subscription","commits_url":"https://api.github.com/repos/elfi-dev/elfi/commits{/sha}","git_commits_url":"https://api.github.com/repos/elfi-dev/elfi/git/commits{/sha}","comments_url":"https://api.github.com/repos/elfi-dev/elfi/comments{/number}","issue_comment_url":"https://api.github.com/repos/elfi-dev/elfi/issues/comments{/number}","contents_url":"https://api.github.com/repos/elfi-dev/elfi/contents/{+path}","compare_url":"https://api.github.com/repos/elfi-dev/elfi/compare/{base}...{head}","merges_url":"https://api.github.com/repos/elfi-dev/elfi/merges","archive_url":"https://api.github.com/repos/elfi-dev/elfi/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/elfi-dev/elfi/downloads","issues_url":"https://api.github.com/repos/elfi-dev/elfi/issues{/number}","pulls_url":"https://api.github.com/repos/elfi-dev/elfi/pulls{/number}","milestones_url":"https://api.github.com/repos/elfi-dev/elfi/milestones{/number}","notifications_url":"https://api.github.com/repos/elfi-dev/elfi/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/elfi-dev/elfi/labels{/name}","releases_url":"https://api.github.com/repos/elfi-dev/elfi/releases{/id}","deployments_url":"https://api.github.com/repos/elfi-dev/elfi/deployments","created_at":"2016-10-03T09:03:38Z","updated_at":"2017-06-01T14:09:53Z","pushed_at":"2017-06-20T17:48:19Z","git_url":"git://github.com/elfi-dev/elfi.git","ssh_url":"git@github.com:elfi-dev/elfi.git","clone_url":"https://github.com/elfi-dev/elfi.git","svn_url":"https://github.com/elfi-dev/elfi","homepage":"http://elfi.readthedocs.io","size":876,"stargazers_count":84,"watchers_count":84,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":14,"mirror_url":null,"open_issues_count":9,"forks":14,"open_issues":9,"watchers":84,"default_branch":"dev"}},"base":{"label":"elfi-dev:dev","ref":"dev","sha":"e47630f8c562cea7470f766b8378030d51c02849","user":{"login":"elfi-dev","id":24249379,"avatar_url":"https://avatars0.githubusercontent.com/u/24249379?v=3","gravatar_id":"","url":"https://api.github.com/users/elfi-dev","html_url":"https://github.com/elfi-dev","followers_url":"https://api.github.com/users/elfi-dev/followers","following_url":"https://api.github.com/users/elfi-dev/following{/other_user}","gists_url":"https://api.github.com/users/elfi-dev/gists{/gist_id}","starred_url":"https://api.github.com/users/elfi-dev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elfi-dev/subscriptions","organizations_url":"https://api.github.com/users/elfi-dev/orgs","repos_url":"https://api.github.com/users/elfi-dev/repos","events_url":"https://api.github.com/users/elfi-dev/events{/privacy}","received_events_url":"https://api.github.com/users/elfi-dev/received_events","type":"Organization","site_admin":false},"repo":{"id":69855441,"name":"elfi","full_name":"elfi-dev/elfi","owner":{"login":"elfi-dev","id":24249379,"avatar_url":"https://avatars0.githubusercontent.com/u/24249379?v=3","gravatar_id":"","url":"https://api.github.com/users/elfi-dev","html_url":"https://github.com/elfi-dev","followers_url":"https://api.github.com/users/elfi-dev/followers","following_url":"https://api.github.com/users/elfi-dev/following{/other_user}","gists_url":"https://api.github.com/users/elfi-dev/gists{/gist_id}","starred_url":"https://api.github.com/users/elfi-dev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elfi-dev/subscriptions","organizations_url":"https://api.github.com/users/elfi-dev/orgs","repos_url":"https://api.github.com/users/elfi-dev/repos","events_url":"https://api.github.com/users/elfi-dev/events{/privacy}","received_events_url":"https://api.github.com/users/elfi-dev/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/elfi-dev/elfi","description":"ELFI - Engine for Likelihood-Free Inference","fork":false,"url":"https://api.github.com/repos/elfi-dev/elfi","forks_url":"https://api.github.com/repos/elfi-dev/elfi/forks","keys_url":"https://api.github.com/repos/elfi-dev/elfi/keys{/key_id}","collaborators_url":"https://api.github.com/repos/elfi-dev/elfi/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/elfi-dev/elfi/teams","hooks_url":"https://api.github.com/repos/elfi-dev/elfi/hooks","issue_events_url":"https://api.github.com/repos/elfi-dev/elfi/issues/events{/number}","events_url":"https://api.github.com/repos/elfi-dev/elfi/events","assignees_url":"https://api.github.com/repos/elfi-dev/elfi/assignees{/user}","branches_url":"https://api.github.com/repos/elfi-dev/elfi/branches{/branch}","tags_url":"https://api.github.com/repos/elfi-dev/elfi/tags","blobs_url":"https://api.github.com/repos/elfi-dev/elfi/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/elfi-dev/elfi/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/elfi-dev/elfi/git/refs{/sha}","trees_url":"https://api.github.com/repos/elfi-dev/elfi/git/trees{/sha}","statuses_url":"https://api.github.com/repos/elfi-dev/elfi/statuses/{sha}","languages_url":"https://api.github.com/repos/elfi-dev/elfi/languages","stargazers_url":"https://api.github.com/repos/elfi-dev/elfi/stargazers","contributors_url":"https://api.github.com/repos/elfi-dev/elfi/contributors","subscribers_url":"https://api.github.com/repos/elfi-dev/elfi/subscribers","subscription_url":"https://api.github.com/repos/elfi-dev/elfi/subscription","commits_url":"https://api.github.com/repos/elfi-dev/elfi/commits{/sha}","git_commits_url":"https://api.github.com/repos/elfi-dev/elfi/git/commits{/sha}","comments_url":"https://api.github.com/repos/elfi-dev/elfi/comments{/number}","issue_comment_url":"https://api.github.com/repos/elfi-dev/elfi/issues/comments{/number}","contents_url":"https://api.github.com/repos/elfi-dev/elfi/contents/{+path}","compare_url":"https://api.github.com/repos/elfi-dev/elfi/compare/{base}...{head}","merges_url":"https://api.github.com/repos/elfi-dev/elfi/merges","archive_url":"https://api.github.com/repos/elfi-dev/elfi/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/elfi-dev/elfi/downloads","issues_url":"https://api.github.com/repos/elfi-dev/elfi/issues{/number}","pulls_url":"https://api.github.com/repos/elfi-dev/elfi/pulls{/number}","milestones_url":"https://api.github.com/repos/elfi-dev/elfi/milestones{/number}","notifications_url":"https://api.github.com/repos/elfi-dev/elfi/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/elfi-dev/elfi/labels{/name}","releases_url":"https://api.github.com/repos/elfi-dev/elfi/releases{/id}","deployments_url":"https://api.github.com/repos/elfi-dev/elfi/deployments","created_at":"2016-10-03T09:03:38Z","updated_at":"2017-06-01T14:09:53Z","pushed_at":"2017-06-20T17:48:19Z","git_url":"git://github.com/elfi-dev/elfi.git","ssh_url":"git@github.com:elfi-dev/elfi.git","clone_url":"https://github.com/elfi-dev/elfi.git","svn_url":"https://github.com/elfi-dev/elfi","homepage":"http://elfi.readthedocs.io","size":876,"stargazers_count":84,"watchers_count":84,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":14,"mirror_url":null,"open_issues_count":9,"forks":14,"open_issues":9,"watchers":84,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/elfi-dev/elfi/pulls/175"},"html":{"href":"https://github.com/elfi-dev/elfi/pull/175"},"issue":{"href":"https://api.github.com/repos/elfi-dev/elfi/issues/175"},"comments":{"href":"https://api.github.com/repos/elfi-dev/elfi/issues/175/comments"},"review_comments":{"href":"https://api.github.com/repos/elfi-dev/elfi/pulls/175/comments"},"review_comment":{"href":"https://api.github.com/repos/elfi-dev/elfi/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/elfi-dev/elfi/pulls/175/commits"},"statuses":{"href":"https://api.github.com/repos/elfi-dev/elfi/statuses/1a4ba75a265015adef4bbad4347099813fb6b2e3"}}}}
{"actor":{"display_login":"lintusj1"}}