{"action":"created","issue":{"url":"https://api.github.com/repos/markdregan/Bayesian-Modelling-in-Python/issues/14","repository_url":"https://api.github.com/repos/markdregan/Bayesian-Modelling-in-Python","labels_url":"https://api.github.com/repos/markdregan/Bayesian-Modelling-in-Python/issues/14/labels{/name}","comments_url":"https://api.github.com/repos/markdregan/Bayesian-Modelling-in-Python/issues/14/comments","events_url":"https://api.github.com/repos/markdregan/Bayesian-Modelling-in-Python/issues/14/events","html_url":"https://github.com/markdregan/Bayesian-Modelling-in-Python/issues/14","id":204814980,"number":14,"title":"Section 2 pymc3 error","user":{"login":"krispy1946","id":4237573,"avatar_url":"https://avatars.githubusercontent.com/u/4237573?v=3","gravatar_id":"","url":"https://api.github.com/users/krispy1946","html_url":"https://github.com/krispy1946","followers_url":"https://api.github.com/users/krispy1946/followers","following_url":"https://api.github.com/users/krispy1946/following{/other_user}","gists_url":"https://api.github.com/users/krispy1946/gists{/gist_id}","starred_url":"https://api.github.com/users/krispy1946/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krispy1946/subscriptions","organizations_url":"https://api.github.com/users/krispy1946/orgs","repos_url":"https://api.github.com/users/krispy1946/repos","events_url":"https://api.github.com/users/krispy1946/events{/privacy}","received_events_url":"https://api.github.com/users/krispy1946/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-02-02T08:58:14Z","updated_at":"2017-02-02T12:38:41Z","closed_at":null,"body":"### Section 2 - Model Check II - Bayes Factor\r\n**Model fails** \r\n   ```\r\n  14 \r\n     15     y_like = pm.DensityDist('y_like',\r\n---> 16              lambda value: pm.switch(tau, \r\n     17                  pm.Poisson.dist(mu_p).logp(value),\r\n     18                  pm.NegativeBinomial.dist(mu_nb, alpha).logp(value)\r\n\r\nAttributeError: module 'pymc3' has no attribute 'switch'\r\n\r\n```\r\nFound a fix suggested by Cameron Davidson-Pilson which looks like it was intended to be merged into your code (but seems it wasn't?). The suggested revision to lambda works fine.\r\n\r\n```\r\n  y_like = pm.DensityDist('y_like',\r\n               lambda value: pm.math.switch(tau, \r\n                   pm.Poisson.dist(mu_p).logp(value),\r\n                   pm.NegativeBinomial.dist(mu_nb, alpha).logp(value)\r\n               ),\r\n               observed=messages['time_delay_seconds'].values)\r\n```"},"comment":{"url":"https://api.github.com/repos/markdregan/Bayesian-Modelling-in-Python/issues/comments/276946673","html_url":"https://github.com/markdregan/Bayesian-Modelling-in-Python/issues/14#issuecomment-276946673","issue_url":"https://api.github.com/repos/markdregan/Bayesian-Modelling-in-Python/issues/14","id":276946673,"user":{"login":"krispy1946","id":4237573,"avatar_url":"https://avatars.githubusercontent.com/u/4237573?v=3","gravatar_id":"","url":"https://api.github.com/users/krispy1946","html_url":"https://github.com/krispy1946","followers_url":"https://api.github.com/users/krispy1946/followers","following_url":"https://api.github.com/users/krispy1946/following{/other_user}","gists_url":"https://api.github.com/users/krispy1946/gists{/gist_id}","starred_url":"https://api.github.com/users/krispy1946/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krispy1946/subscriptions","organizations_url":"https://api.github.com/users/krispy1946/orgs","repos_url":"https://api.github.com/users/krispy1946/repos","events_url":"https://api.github.com/users/krispy1946/events{/privacy}","received_events_url":"https://api.github.com/users/krispy1946/received_events","type":"User","site_admin":false},"created_at":"2017-02-02T12:38:41Z","updated_at":"2017-02-02T12:38:41Z","body":"Some advice please as I'm not a regular 'user' of git.\n\nI've committed  my local changes to my cloned repository but when I make a\npull request I get every change made (whether relevant or not). Is it\npossible to isolate the one simple code change made or do I send the lot?\n\nThanks.\n\nChris\n\nOn 2 February 2017 at 10:08, Thomas Wiecki <notifications@github.com> wrote:\n\n> @krispy1946 <https://github.com/krispy1946> Maybe do a PR.\n>\n> —\n> You are receiving this because you were mentioned.\n> Reply to this email directly, view it on GitHub\n> <https://github.com/markdregan/Bayesian-Modelling-in-Python/issues/14#issuecomment-276903658>,\n> or mute the thread\n> <https://github.com/notifications/unsubscribe-auth/AECpBbortCc7_4e2mTokWN6lpUVoMgjNks5rYZz1gaJpZM4L025A>\n> .\n>\n"}}
{"actor":{"display_login":"krispy1946"}}