{"action":"created","issue":{"url":"https://api.github.com/repos/bat/bat/issues/201","repository_url":"https://api.github.com/repos/bat/bat","labels_url":"https://api.github.com/repos/bat/bat/issues/201/labels{/name}","comments_url":"https://api.github.com/repos/bat/bat/issues/201/comments","events_url":"https://api.github.com/repos/bat/bat/issues/201/events","html_url":"https://github.com/bat/bat/issues/201","id":205841697,"number":201,"title":"Fraction Fit-Parameter class","user":{"login":"tquante","id":2655704,"avatar_url":"https://avatars.githubusercontent.com/u/2655704?v=3","gravatar_id":"","url":"https://api.github.com/users/tquante","html_url":"https://github.com/tquante","followers_url":"https://api.github.com/users/tquante/followers","following_url":"https://api.github.com/users/tquante/following{/other_user}","gists_url":"https://api.github.com/users/tquante/gists{/gist_id}","starred_url":"https://api.github.com/users/tquante/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tquante/subscriptions","organizations_url":"https://api.github.com/users/tquante/orgs","repos_url":"https://api.github.com/users/tquante/repos","events_url":"https://api.github.com/users/tquante/events{/privacy}","received_events_url":"https://api.github.com/users/tquante/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-02-07T10:09:54Z","updated_at":"2017-02-23T15:27:03Z","closed_at":null,"body":"Dear Developers,\r\n\r\ncurrently I working on a fit that includes several fractions. These fractions are used as scaling parameters \r\nas in the following example:\r\n\r\n`B*f1 +B*f2 +B*(1-f1-f2)`\r\n\r\nThe main problem which arise is, that the sum of all fraction must be equal to 1. To overcome this problem  the likelihood returns nan in case the sum is above one. Due to the fact that Bat tries to find a valid likelihood before starting the prerun this results in a fit failure, if many fractions are involved. Increasing the number of tries helps a bit, but there are still too many MCMC steps which cannot be used, resulting in very long execution times.\r\n\r\nWould it be possible to provide a class which registers all fractions to assure that the the sum of all fractions is 1 for each iteration? Or is there any interface, which I did not notice in BAT, that can be used for that?\r\n\r\nThanks for your help\r\n\r\n\r\n "},"comment":{"url":"https://api.github.com/repos/bat/bat/issues/comments/282023300","html_url":"https://github.com/bat/bat/issues/201#issuecomment-282023300","issue_url":"https://api.github.com/repos/bat/bat/issues/201","id":282023300,"user":{"login":"fredRos","id":1833693,"avatar_url":"https://avatars.githubusercontent.com/u/1833693?v=3","gravatar_id":"","url":"https://api.github.com/users/fredRos","html_url":"https://github.com/fredRos","followers_url":"https://api.github.com/users/fredRos/followers","following_url":"https://api.github.com/users/fredRos/following{/other_user}","gists_url":"https://api.github.com/users/fredRos/gists{/gist_id}","starred_url":"https://api.github.com/users/fredRos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fredRos/subscriptions","organizations_url":"https://api.github.com/users/fredRos/orgs","repos_url":"https://api.github.com/users/fredRos/repos","events_url":"https://api.github.com/users/fredRos/events{/privacy}","received_events_url":"https://api.github.com/users/fredRos/received_events","type":"User","site_admin":false},"created_at":"2017-02-23T15:27:03Z","updated_at":"2017-02-23T15:27:03Z","body":"dear @tquante, am I right that a fraction in your equation is `f1` and `f2`? The general approach to this problem is to realize that the fractions are constrained to lie on the unit simplex. The stick breaking procedure allows you to draw a point on the simplex without generating invalid points.  See the attached pdf. \r\n[simplex.pdf](https://github.com/bat/bat/files/796878/simplex.pdf)\r\n\r\nWe did not implement this yet because it add some complexity to handling the parameters together. Let me know if this helps and if you think we can find a simple way to incorporate this in a general manner into bat\r\n"}}
{"actor":{"display_login":"fredRos"}}