{"action":"created","issue":{"url":"https://api.github.com/repos/probmods/webppl/issues/713","repository_url":"https://api.github.com/repos/probmods/webppl","labels_url":"https://api.github.com/repos/probmods/webppl/issues/713/labels{/name}","comments_url":"https://api.github.com/repos/probmods/webppl/issues/713/comments","events_url":"https://api.github.com/repos/probmods/webppl/issues/713/events","html_url":"https://github.com/probmods/webppl/issues/713","id":191779795,"number":713,"title":"Mixture distribution primitives","user":{"login":"dritchie","id":2229830,"avatar_url":"https://avatars.githubusercontent.com/u/2229830?v=3","gravatar_id":"","url":"https://api.github.com/users/dritchie","html_url":"https://github.com/dritchie","followers_url":"https://api.github.com/users/dritchie/followers","following_url":"https://api.github.com/users/dritchie/following{/other_user}","gists_url":"https://api.github.com/users/dritchie/gists{/gist_id}","starred_url":"https://api.github.com/users/dritchie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dritchie/subscriptions","organizations_url":"https://api.github.com/users/dritchie/orgs","repos_url":"https://api.github.com/users/dritchie/repos","events_url":"https://api.github.com/users/dritchie/events{/privacy}","received_events_url":"https://api.github.com/users/dritchie/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-11-26T01:18:25Z","updated_at":"2016-11-28T18:55:04Z","closed_at":null,"body":"Normally, a mixture distribution can be expressed via a simple webppl program (first choose the mixture component, then sample from that component). However, there are (at least) a couple scenarios where having a \"primitive\" mixture distribution comes in handy:\r\n\r\n1. The 'enumerating out' trick for reducing variance of the ELBo estimator only works with discrete mixtures. For continuous mixtures (such as GMMs), users have to do the marginalization manually. It'd be nice if this was taken care of automatically.\r\n2. Using mixture distributions as guides (e.g. guiding a `Gaussian` with a `GaussianMixture`, b/c the posterior may be multimodal). This was useful in the neurally-guided procedural modeling work.\r\n\r\nThere may be other ways to achieve these two goals, but having primitive mixture distribution types seems like the most direct way.\r\n\r\nFor the NGPM demo I'm building right now, I'm just adding a `GaussianMixture` distribution, but it would be nice to build a more general-purpose constructor that takes a base distribution type and builds a mixture distribution out of it (also: I'd like if my demo ran under \"real\" webppl, and not my hacked-up version). This would either be callable in webppl code (i.e. a higher-order distribution constructor), or we'd have an npm post-install step that would statically create all the potentially useful mixture types. Thoughts on which is preferable?"},"comment":{"url":"https://api.github.com/repos/probmods/webppl/issues/comments/263359424","html_url":"https://github.com/probmods/webppl/issues/713#issuecomment-263359424","issue_url":"https://api.github.com/repos/probmods/webppl/issues/713","id":263359424,"user":{"login":"ngoodman","id":461193,"avatar_url":"https://avatars.githubusercontent.com/u/461193?v=3","gravatar_id":"","url":"https://api.github.com/users/ngoodman","html_url":"https://github.com/ngoodman","followers_url":"https://api.github.com/users/ngoodman/followers","following_url":"https://api.github.com/users/ngoodman/following{/other_user}","gists_url":"https://api.github.com/users/ngoodman/gists{/gist_id}","starred_url":"https://api.github.com/users/ngoodman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ngoodman/subscriptions","organizations_url":"https://api.github.com/users/ngoodman/orgs","repos_url":"https://api.github.com/users/ngoodman/repos","events_url":"https://api.github.com/users/ngoodman/events{/privacy}","received_events_url":"https://api.github.com/users/ngoodman/received_events","type":"User","site_admin":false},"created_at":"2016-11-28T18:55:04Z","updated_at":"2016-11-28T18:55:04Z","body":"how hard would it be to get this to work in \"pure webppl\"? ie if you try to build a mixture using Infer? maybe what's needed is a sensible way of aggregating Dists when they are the return value of the model in Infer?"}}
{"actor":{"display_login":"ngoodman"}}