{"action":"created","issue":{"url":"https://api.github.com/repos/pymc-devs/pymc3/issues/1205","repository_url":"https://api.github.com/repos/pymc-devs/pymc3","labels_url":"https://api.github.com/repos/pymc-devs/pymc3/issues/1205/labels{/name}","comments_url":"https://api.github.com/repos/pymc-devs/pymc3/issues/1205/comments","events_url":"https://api.github.com/repos/pymc-devs/pymc3/issues/1205/events","html_url":"https://github.com/pymc-devs/pymc3/pull/1205","id":161607422,"number":1205,"title":"WIP Upper/lower bounded distributions","user":{"login":"aasensio","id":1766597,"avatar_url":"https://avatars.githubusercontent.com/u/1766597?v=3","gravatar_id":"","url":"https://api.github.com/users/aasensio","html_url":"https://github.com/aasensio","followers_url":"https://api.github.com/users/aasensio/followers","following_url":"https://api.github.com/users/aasensio/following{/other_user}","gists_url":"https://api.github.com/users/aasensio/gists{/gist_id}","starred_url":"https://api.github.com/users/aasensio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aasensio/subscriptions","organizations_url":"https://api.github.com/users/aasensio/orgs","repos_url":"https://api.github.com/users/aasensio/repos","events_url":"https://api.github.com/users/aasensio/events{/privacy}","received_events_url":"https://api.github.com/users/aasensio/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2016-06-22T06:59:37Z","updated_at":"2016-06-22T12:41:47Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/pymc-devs/pymc3/pulls/1205","html_url":"https://github.com/pymc-devs/pymc3/pull/1205","diff_url":"https://github.com/pymc-devs/pymc3/pull/1205.diff","patch_url":"https://github.com/pymc-devs/pymc3/pull/1205.patch"},"body":"The upper/lower bounded distributions now include variable transformations to optimize the sampling, that is now made on an unconstrained space. I didn't find a suitable way of merging the current Log transform and the LowerBound transform without including the \"lower\" parameter as a default for all distributions."},"comment":{"url":"https://api.github.com/repos/pymc-devs/pymc3/issues/comments/227730737","html_url":"https://github.com/pymc-devs/pymc3/pull/1205#issuecomment-227730737","issue_url":"https://api.github.com/repos/pymc-devs/pymc3/issues/1205","id":227730737,"user":{"login":"aasensio","id":1766597,"avatar_url":"https://avatars.githubusercontent.com/u/1766597?v=3","gravatar_id":"","url":"https://api.github.com/users/aasensio","html_url":"https://github.com/aasensio","followers_url":"https://api.github.com/users/aasensio/followers","following_url":"https://api.github.com/users/aasensio/following{/other_user}","gists_url":"https://api.github.com/users/aasensio/gists{/gist_id}","starred_url":"https://api.github.com/users/aasensio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aasensio/subscriptions","organizations_url":"https://api.github.com/users/aasensio/orgs","repos_url":"https://api.github.com/users/aasensio/repos","events_url":"https://api.github.com/users/aasensio/events{/privacy}","received_events_url":"https://api.github.com/users/aasensio/received_events","type":"User","site_admin":false},"created_at":"2016-06-22T12:41:47Z","updated_at":"2016-06-22T12:41:47Z","body":"BTW, while working on the tests for the lower/upper bounded transformation, I noticed that `check_jacobian_det` in `test_transforms.py` is probably missing an absolute value operator when `elemwise=True`. The important quantity on the transformation is the absolute value of the Jacobian, which is safely taken into account with the determinant, but not in the case that `elemwise=True`. I will also update it if I finally make this PR work. I've already included the tests for the new transformations and all of them pass OK.\r\n\r\n```\r\ndef check_jacobian_det(transform, domain, constructor=t.dscalar, test=0, make_comparable=None, elemwise=False):\r\n    y = constructor('y')\r\n    y.tag.test_value = test\r\n\r\n    x = transform.backward(y)\r\n    if make_comparable:\r\n        x = make_comparable(x)\r\n\r\n    if not elemwise: \r\n        jac = t.log(t.nlinalg.det(jacobian(x, [y])))\r\n    else:\r\n        jac = t.log(t.abs_(t.diag(jacobian(x, [y]))))\r\n```"}}
{"actor":{"display_login":"aasensio"}}