{"action":"created","comment":{"url":"https://api.github.com/repos/QInfer/python-qinfer/pulls/comments/117576960","pull_request_review_id":39299941,"id":117576960,"diff_hunk":"@@ -61,7 +62,7 @@\n \n class Resampler(with_metaclass(ABCMeta, object)):\n     @abstractmethod\n-    def __call__(self,  model, particle_weights, particle_locations,\n+    def __call__(self,  model, particle_dist,","path":"src/qinfer/resamplers.py","position":22,"original_position":22,"commit_id":"8061ae2a2a6fb947f8b74ed02ccfda2860580c4f","original_commit_id":"8061ae2a2a6fb947f8b74ed02ccfda2860580c4f","user":{"login":"cgranade","id":31516,"avatar_url":"https://avatars0.githubusercontent.com/u/31516?v=3","gravatar_id":"","url":"https://api.github.com/users/cgranade","html_url":"https://github.com/cgranade","followers_url":"https://api.github.com/users/cgranade/followers","following_url":"https://api.github.com/users/cgranade/following{/other_user}","gists_url":"https://api.github.com/users/cgranade/gists{/gist_id}","starred_url":"https://api.github.com/users/cgranade/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cgranade/subscriptions","organizations_url":"https://api.github.com/users/cgranade/orgs","repos_url":"https://api.github.com/users/cgranade/repos","events_url":"https://api.github.com/users/cgranade/events{/privacy}","received_events_url":"https://api.github.com/users/cgranade/received_events","type":"User","site_admin":false},"body":"I can't think of any better way to do this, and like the new API you're suggesting here, but it is also a breaking change. That said, I can't think of any third-party code with custom resamplers that couldn't be readily fixed. At any rate, following semver, we should make sure to label the new version at least 1.1 as a result.","created_at":"2017-05-19T21:15:25Z","updated_at":"2017-05-19T21:17:10Z","html_url":"https://github.com/QInfer/python-qinfer/pull/133#discussion_r117576960","pull_request_url":"https://api.github.com/repos/QInfer/python-qinfer/pulls/133","_links":{"self":{"href":"https://api.github.com/repos/QInfer/python-qinfer/pulls/comments/117576960"},"html":{"href":"https://github.com/QInfer/python-qinfer/pull/133#discussion_r117576960"},"pull_request":{"href":"https://api.github.com/repos/QInfer/python-qinfer/pulls/133"}}},"pull_request":{"url":"https://api.github.com/repos/QInfer/python-qinfer/pulls/133","id":121222700,"html_url":"https://github.com/QInfer/python-qinfer/pull/133","diff_url":"https://github.com/QInfer/python-qinfer/pull/133.diff","patch_url":"https://github.com/QInfer/python-qinfer/pull/133.patch","issue_url":"https://api.github.com/repos/QInfer/python-qinfer/issues/133","number":133,"state":"open","locked":false,"title":"Feature custom meanfn","user":{"login":"dseuss","id":5870291,"avatar_url":"https://avatars2.githubusercontent.com/u/5870291?v=3","gravatar_id":"","url":"https://api.github.com/users/dseuss","html_url":"https://github.com/dseuss","followers_url":"https://api.github.com/users/dseuss/followers","following_url":"https://api.github.com/users/dseuss/following{/other_user}","gists_url":"https://api.github.com/users/dseuss/gists{/gist_id}","starred_url":"https://api.github.com/users/dseuss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dseuss/subscriptions","organizations_url":"https://api.github.com/users/dseuss/orgs","repos_url":"https://api.github.com/users/dseuss/repos","events_url":"https://api.github.com/users/dseuss/events{/privacy}","received_events_url":"https://api.github.com/users/dseuss/received_events","type":"User","site_admin":false},"body":"This is a first suggestion how to move all the particle mean/covariance related logic into the `ParticleDistribution` class itself. This allows the user to provide his/her own moment-computing functions as show in [this Notebook](https://github.com/dseuss/qinfer-examples/blob/master/circular_statistics.ipynb).\r\n\r\nI have not touched the clustering-resampler related stuff so far since this is work in progress. Once we have agreed on the right interface, this can certainly be done.\r\n\r\nThe other place that should be fixed is how the LW resampler combines the two resampling strategies [here](https://github.com/QInfer/python-qinfer/blob/master/src/qinfer/resamplers.py#L326). For each particle, this is a mean over two (virtual) particles with weights `a` and `1-a`. In the Notebook I get around the problem by disabling postselection and by running cannonicalization afterwards. \r\n\r\nBTW, Sorry for the unnecessary deleted whitespaces...","created_at":"2017-05-18T08:00:56Z","updated_at":"2017-05-19T21:17:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a5297b25e615fb40139d00ca621a62d8dd50c476","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/QInfer/python-qinfer/pulls/133/commits","review_comments_url":"https://api.github.com/repos/QInfer/python-qinfer/pulls/133/comments","review_comment_url":"https://api.github.com/repos/QInfer/python-qinfer/pulls/comments{/number}","comments_url":"https://api.github.com/repos/QInfer/python-qinfer/issues/133/comments","statuses_url":"https://api.github.com/repos/QInfer/python-qinfer/statuses/8061ae2a2a6fb947f8b74ed02ccfda2860580c4f","head":{"label":"dseuss:feature-custom-meanfn","ref":"feature-custom-meanfn","sha":"8061ae2a2a6fb947f8b74ed02ccfda2860580c4f","user":{"login":"dseuss","id":5870291,"avatar_url":"https://avatars2.githubusercontent.com/u/5870291?v=3","gravatar_id":"","url":"https://api.github.com/users/dseuss","html_url":"https://github.com/dseuss","followers_url":"https://api.github.com/users/dseuss/followers","following_url":"https://api.github.com/users/dseuss/following{/other_user}","gists_url":"https://api.github.com/users/dseuss/gists{/gist_id}","starred_url":"https://api.github.com/users/dseuss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dseuss/subscriptions","organizations_url":"https://api.github.com/users/dseuss/orgs","repos_url":"https://api.github.com/users/dseuss/repos","events_url":"https://api.github.com/users/dseuss/events{/privacy}","received_events_url":"https://api.github.com/users/dseuss/received_events","type":"User","site_admin":false},"repo":{"id":89542592,"name":"python-qinfer","full_name":"dseuss/python-qinfer","owner":{"login":"dseuss","id":5870291,"avatar_url":"https://avatars2.githubusercontent.com/u/5870291?v=3","gravatar_id":"","url":"https://api.github.com/users/dseuss","html_url":"https://github.com/dseuss","followers_url":"https://api.github.com/users/dseuss/followers","following_url":"https://api.github.com/users/dseuss/following{/other_user}","gists_url":"https://api.github.com/users/dseuss/gists{/gist_id}","starred_url":"https://api.github.com/users/dseuss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dseuss/subscriptions","organizations_url":"https://api.github.com/users/dseuss/orgs","repos_url":"https://api.github.com/users/dseuss/repos","events_url":"https://api.github.com/users/dseuss/events{/privacy}","received_events_url":"https://api.github.com/users/dseuss/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dseuss/python-qinfer","description":"Library for Bayesian inference via sequential Monte Carlo for quantum parameter estimation.","fork":true,"url":"https://api.github.com/repos/dseuss/python-qinfer","forks_url":"https://api.github.com/repos/dseuss/python-qinfer/forks","keys_url":"https://api.github.com/repos/dseuss/python-qinfer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dseuss/python-qinfer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dseuss/python-qinfer/teams","hooks_url":"https://api.github.com/repos/dseuss/python-qinfer/hooks","issue_events_url":"https://api.github.com/repos/dseuss/python-qinfer/issues/events{/number}","events_url":"https://api.github.com/repos/dseuss/python-qinfer/events","assignees_url":"https://api.github.com/repos/dseuss/python-qinfer/assignees{/user}","branches_url":"https://api.github.com/repos/dseuss/python-qinfer/branches{/branch}","tags_url":"https://api.github.com/repos/dseuss/python-qinfer/tags","blobs_url":"https://api.github.com/repos/dseuss/python-qinfer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dseuss/python-qinfer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dseuss/python-qinfer/git/refs{/sha}","trees_url":"https://api.github.com/repos/dseuss/python-qinfer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dseuss/python-qinfer/statuses/{sha}","languages_url":"https://api.github.com/repos/dseuss/python-qinfer/languages","stargazers_url":"https://api.github.com/repos/dseuss/python-qinfer/stargazers","contributors_url":"https://api.github.com/repos/dseuss/python-qinfer/contributors","subscribers_url":"https://api.github.com/repos/dseuss/python-qinfer/subscribers","subscription_url":"https://api.github.com/repos/dseuss/python-qinfer/subscription","commits_url":"https://api.github.com/repos/dseuss/python-qinfer/commits{/sha}","git_commits_url":"https://api.github.com/repos/dseuss/python-qinfer/git/commits{/sha}","comments_url":"https://api.github.com/repos/dseuss/python-qinfer/comments{/number}","issue_comment_url":"https://api.github.com/repos/dseuss/python-qinfer/issues/comments{/number}","contents_url":"https://api.github.com/repos/dseuss/python-qinfer/contents/{+path}","compare_url":"https://api.github.com/repos/dseuss/python-qinfer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dseuss/python-qinfer/merges","archive_url":"https://api.github.com/repos/dseuss/python-qinfer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dseuss/python-qinfer/downloads","issues_url":"https://api.github.com/repos/dseuss/python-qinfer/issues{/number}","pulls_url":"https://api.github.com/repos/dseuss/python-qinfer/pulls{/number}","milestones_url":"https://api.github.com/repos/dseuss/python-qinfer/milestones{/number}","notifications_url":"https://api.github.com/repos/dseuss/python-qinfer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dseuss/python-qinfer/labels{/name}","releases_url":"https://api.github.com/repos/dseuss/python-qinfer/releases{/id}","deployments_url":"https://api.github.com/repos/dseuss/python-qinfer/deployments","created_at":"2017-04-27T01:33:50Z","updated_at":"2017-04-27T01:33:51Z","pushed_at":"2017-05-18T07:50:48Z","git_url":"git://github.com/dseuss/python-qinfer.git","ssh_url":"git@github.com:dseuss/python-qinfer.git","clone_url":"https://github.com/dseuss/python-qinfer.git","svn_url":"https://github.com/dseuss/python-qinfer","homepage":"","size":4098,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"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":"QInfer:master","ref":"master","sha":"4fd1e4aae9a6031b689e7cbdc6e54b46cd1bbbf5","user":{"login":"QInfer","id":16830480,"avatar_url":"https://avatars0.githubusercontent.com/u/16830480?v=3","gravatar_id":"","url":"https://api.github.com/users/QInfer","html_url":"https://github.com/QInfer","followers_url":"https://api.github.com/users/QInfer/followers","following_url":"https://api.github.com/users/QInfer/following{/other_user}","gists_url":"https://api.github.com/users/QInfer/gists{/gist_id}","starred_url":"https://api.github.com/users/QInfer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/QInfer/subscriptions","organizations_url":"https://api.github.com/users/QInfer/orgs","repos_url":"https://api.github.com/users/QInfer/repos","events_url":"https://api.github.com/users/QInfer/events{/privacy}","received_events_url":"https://api.github.com/users/QInfer/received_events","type":"Organization","site_admin":false},"repo":{"id":5420581,"name":"python-qinfer","full_name":"QInfer/python-qinfer","owner":{"login":"QInfer","id":16830480,"avatar_url":"https://avatars0.githubusercontent.com/u/16830480?v=3","gravatar_id":"","url":"https://api.github.com/users/QInfer","html_url":"https://github.com/QInfer","followers_url":"https://api.github.com/users/QInfer/followers","following_url":"https://api.github.com/users/QInfer/following{/other_user}","gists_url":"https://api.github.com/users/QInfer/gists{/gist_id}","starred_url":"https://api.github.com/users/QInfer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/QInfer/subscriptions","organizations_url":"https://api.github.com/users/QInfer/orgs","repos_url":"https://api.github.com/users/QInfer/repos","events_url":"https://api.github.com/users/QInfer/events{/privacy}","received_events_url":"https://api.github.com/users/QInfer/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/QInfer/python-qinfer","description":"Library for Bayesian inference via sequential Monte Carlo for quantum parameter estimation.","fork":false,"url":"https://api.github.com/repos/QInfer/python-qinfer","forks_url":"https://api.github.com/repos/QInfer/python-qinfer/forks","keys_url":"https://api.github.com/repos/QInfer/python-qinfer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/QInfer/python-qinfer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/QInfer/python-qinfer/teams","hooks_url":"https://api.github.com/repos/QInfer/python-qinfer/hooks","issue_events_url":"https://api.github.com/repos/QInfer/python-qinfer/issues/events{/number}","events_url":"https://api.github.com/repos/QInfer/python-qinfer/events","assignees_url":"https://api.github.com/repos/QInfer/python-qinfer/assignees{/user}","branches_url":"https://api.github.com/repos/QInfer/python-qinfer/branches{/branch}","tags_url":"https://api.github.com/repos/QInfer/python-qinfer/tags","blobs_url":"https://api.github.com/repos/QInfer/python-qinfer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/QInfer/python-qinfer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/QInfer/python-qinfer/git/refs{/sha}","trees_url":"https://api.github.com/repos/QInfer/python-qinfer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/QInfer/python-qinfer/statuses/{sha}","languages_url":"https://api.github.com/repos/QInfer/python-qinfer/languages","stargazers_url":"https://api.github.com/repos/QInfer/python-qinfer/stargazers","contributors_url":"https://api.github.com/repos/QInfer/python-qinfer/contributors","subscribers_url":"https://api.github.com/repos/QInfer/python-qinfer/subscribers","subscription_url":"https://api.github.com/repos/QInfer/python-qinfer/subscription","commits_url":"https://api.github.com/repos/QInfer/python-qinfer/commits{/sha}","git_commits_url":"https://api.github.com/repos/QInfer/python-qinfer/git/commits{/sha}","comments_url":"https://api.github.com/repos/QInfer/python-qinfer/comments{/number}","issue_comment_url":"https://api.github.com/repos/QInfer/python-qinfer/issues/comments{/number}","contents_url":"https://api.github.com/repos/QInfer/python-qinfer/contents/{+path}","compare_url":"https://api.github.com/repos/QInfer/python-qinfer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/QInfer/python-qinfer/merges","archive_url":"https://api.github.com/repos/QInfer/python-qinfer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/QInfer/python-qinfer/downloads","issues_url":"https://api.github.com/repos/QInfer/python-qinfer/issues{/number}","pulls_url":"https://api.github.com/repos/QInfer/python-qinfer/pulls{/number}","milestones_url":"https://api.github.com/repos/QInfer/python-qinfer/milestones{/number}","notifications_url":"https://api.github.com/repos/QInfer/python-qinfer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/QInfer/python-qinfer/labels{/name}","releases_url":"https://api.github.com/repos/QInfer/python-qinfer/releases{/id}","deployments_url":"https://api.github.com/repos/QInfer/python-qinfer/deployments","created_at":"2012-08-15T01:02:45Z","updated_at":"2017-05-07T05:10:12Z","pushed_at":"2017-05-19T04:53:57Z","git_url":"git://github.com/QInfer/python-qinfer.git","ssh_url":"git@github.com:QInfer/python-qinfer.git","clone_url":"https://github.com/QInfer/python-qinfer.git","svn_url":"https://github.com/QInfer/python-qinfer","homepage":"","size":4118,"stargazers_count":35,"watchers_count":35,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":19,"mirror_url":null,"open_issues_count":12,"forks":19,"open_issues":12,"watchers":35,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/QInfer/python-qinfer/pulls/133"},"html":{"href":"https://github.com/QInfer/python-qinfer/pull/133"},"issue":{"href":"https://api.github.com/repos/QInfer/python-qinfer/issues/133"},"comments":{"href":"https://api.github.com/repos/QInfer/python-qinfer/issues/133/comments"},"review_comments":{"href":"https://api.github.com/repos/QInfer/python-qinfer/pulls/133/comments"},"review_comment":{"href":"https://api.github.com/repos/QInfer/python-qinfer/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/QInfer/python-qinfer/pulls/133/commits"},"statuses":{"href":"https://api.github.com/repos/QInfer/python-qinfer/statuses/8061ae2a2a6fb947f8b74ed02ccfda2860580c4f"}}}}
{"actor":{"display_login":"cgranade"}}