{"action":"created","issue":{"url":"https://api.github.com/repos/LABSN/expyfun/issues/301","repository_url":"https://api.github.com/repos/LABSN/expyfun","labels_url":"https://api.github.com/repos/LABSN/expyfun/issues/301/labels{/name}","comments_url":"https://api.github.com/repos/LABSN/expyfun/issues/301/comments","events_url":"https://api.github.com/repos/LABSN/expyfun/issues/301/events","html_url":"https://github.com/LABSN/expyfun/pull/301","id":213478885,"number":301,"title":"MRG: Adaptive Tracker","user":{"login":"rkmaddox","id":3029642,"avatar_url":"https://avatars0.githubusercontent.com/u/3029642?v=3","gravatar_id":"","url":"https://api.github.com/users/rkmaddox","html_url":"https://github.com/rkmaddox","followers_url":"https://api.github.com/users/rkmaddox/followers","following_url":"https://api.github.com/users/rkmaddox/following{/other_user}","gists_url":"https://api.github.com/users/rkmaddox/gists{/gist_id}","starred_url":"https://api.github.com/users/rkmaddox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rkmaddox/subscriptions","organizations_url":"https://api.github.com/users/rkmaddox/orgs","repos_url":"https://api.github.com/users/rkmaddox/repos","events_url":"https://api.github.com/users/rkmaddox/events{/privacy}","received_events_url":"https://api.github.com/users/rkmaddox/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":50,"created_at":"2017-03-10T23:23:29Z","updated_at":"2017-04-11T20:57:46Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/LABSN/expyfun/pulls/301","html_url":"https://github.com/LABSN/expyfun/pull/301","diff_url":"https://github.com/LABSN/expyfun/pull/301.diff","patch_url":"https://github.com/LABSN/expyfun/pull/301.patch"},"body":"Adds three classes to `expyfun.stimuli`: `TrackerUD`, `TrackerBinom`, and `TrackerDealer`.\r\n\r\n`TrackerUD`: Standard staircase.\r\n`TrackerBinom`: Keeps track of probability of null hypothesis that subject is guessing. Useful for training subjects to a certain p-value, though note the inherent multiple comparisons problem. Probably best to use p = 0.02 or so.\r\n`TrackerDealer`: a group of trackers. It handles trial order so that all trackers stay within a certain number of trials or reversals, but randomizes as much as possible within that constraint.\r\n\r\nLots more documentation to come, but I wanted to get this in as a PR so my undergrad, Maddy, could take a look at it.\r\n\r\nFeel free to make comments now if you can make heads or tails of it.\r\n\r\nThis code should do a 100 trial run that uses a weighted up-down (Kaernbach, 1991) to converge at 75% correct.\r\n\r\n```python\r\nimport numpy as np\r\nfrom expyfun.stimuli import TrackerUD\r\ndef callback(event_type, value=None, timestamp=None):\r\n    print(event_type, value, timestamp)\r\ntr = TrackerUD(callback, 1, 1, 0.06, 0.02, 100, 'trials', 1)\r\nwhile not tr.stopped:\r\n    tr.respond(np.random.rand() < tr.x_current)\r\ntr.plot()\r\n```"},"comment":{"url":"https://api.github.com/repos/LABSN/expyfun/issues/comments/293397704","html_url":"https://github.com/LABSN/expyfun/pull/301#issuecomment-293397704","issue_url":"https://api.github.com/repos/LABSN/expyfun/issues/301","id":293397704,"user":{"login":"Eric89GXL","id":2365790,"avatar_url":"https://avatars2.githubusercontent.com/u/2365790?v=3","gravatar_id":"","url":"https://api.github.com/users/Eric89GXL","html_url":"https://github.com/Eric89GXL","followers_url":"https://api.github.com/users/Eric89GXL/followers","following_url":"https://api.github.com/users/Eric89GXL/following{/other_user}","gists_url":"https://api.github.com/users/Eric89GXL/gists{/gist_id}","starred_url":"https://api.github.com/users/Eric89GXL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Eric89GXL/subscriptions","organizations_url":"https://api.github.com/users/Eric89GXL/orgs","repos_url":"https://api.github.com/users/Eric89GXL/repos","events_url":"https://api.github.com/users/Eric89GXL/events{/privacy}","received_events_url":"https://api.github.com/users/Eric89GXL/received_events","type":"User","site_admin":false},"created_at":"2017-04-11T20:57:46Z","updated_at":"2017-04-11T20:57:46Z","body":"It's also possible we have some other underlying bug we need to fix, but the critical thing for @rkmaddox is that those decorators will make his tests pass :)"}}
{"actor":{"display_login":"Eric89GXL"}}