{"action":"created","issue":{"url":"https://api.github.com/repos/MKaptein/streamingbandit/issues/14","labels_url":"https://api.github.com/repos/MKaptein/streamingbandit/issues/14/labels{/name}","comments_url":"https://api.github.com/repos/MKaptein/streamingbandit/issues/14/comments","events_url":"https://api.github.com/repos/MKaptein/streamingbandit/issues/14/events","html_url":"https://github.com/MKaptein/streamingbandit/issues/14","id":119305304,"number":14,"title":"Default values in setReward for ABC test should be zero","user":{"login":"robinvanemden","id":95014,"avatar_url":"https://avatars.githubusercontent.com/u/95014?v=3","gravatar_id":"","url":"https://api.github.com/users/robinvanemden","html_url":"https://github.com/robinvanemden","followers_url":"https://api.github.com/users/robinvanemden/followers","following_url":"https://api.github.com/users/robinvanemden/following{/other_user}","gists_url":"https://api.github.com/users/robinvanemden/gists{/gist_id}","starred_url":"https://api.github.com/users/robinvanemden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robinvanemden/subscriptions","organizations_url":"https://api.github.com/users/robinvanemden/orgs","repos_url":"https://api.github.com/users/robinvanemden/repos","events_url":"https://api.github.com/users/robinvanemden/events{/privacy}","received_events_url":"https://api.github.com/users/robinvanemden/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-11-28T16:32:31Z","updated_at":"2015-11-28T16:59:02Z","closed_at":null,"body":"Seems that the following in \"ABC test\" setReward() \r\n\r\n```python\r\nn = self.get_theta().get(\"n\",1) + 1\r\nself.set_theta({\"n\":n})\r\n\r\n# If still running increase action count\r\nif N==0 or n<N:\r\n    d = self.get_theta(action={'choice':self.action['choice']})\r\n    s = d.get(\"s\",1) + self.reward\r\n    n = d.get(\"n\",2) + 1\r\n    self.set_theta({\"s\":s, \"n\":n}, action={'choice':self.action['choice']})\r\n```\r\nshould be\r\n\r\n```python\r\nn = self.get_theta().get(\"n\",0) + 1\r\nself.set_theta({\"n\":n})\r\n\r\n# If still running increase action count\r\nif N==0 or n<N:\r\n    d = self.get_theta(action={'choice':self.action['choice']})\r\n    s = d.get(\"s\",0) + self.reward\r\n    n = d.get(\"n\",0) + 1\r\n    self.set_theta({\"s\":s, \"n\":n}, action={'choice':self.action['choice']})\r\n```\r\n\r\nOtherwise, the the n counter after the first choice will be 2 , not 1, for theta and 3 instead of 1 for theta:choice. Also, reward will start at 1 plus the reward of a particular choice, instead of just the reward value of that particular choice."},"comment":{"url":"https://api.github.com/repos/MKaptein/streamingbandit/issues/comments/160318905","html_url":"https://github.com/MKaptein/streamingbandit/issues/14#issuecomment-160318905","issue_url":"https://api.github.com/repos/MKaptein/streamingbandit/issues/14","id":160318905,"user":{"login":"MKaptein","id":5011983,"avatar_url":"https://avatars.githubusercontent.com/u/5011983?v=3","gravatar_id":"","url":"https://api.github.com/users/MKaptein","html_url":"https://github.com/MKaptein","followers_url":"https://api.github.com/users/MKaptein/followers","following_url":"https://api.github.com/users/MKaptein/following{/other_user}","gists_url":"https://api.github.com/users/MKaptein/gists{/gist_id}","starred_url":"https://api.github.com/users/MKaptein/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MKaptein/subscriptions","organizations_url":"https://api.github.com/users/MKaptein/orgs","repos_url":"https://api.github.com/users/MKaptein/repos","events_url":"https://api.github.com/users/MKaptein/events{/privacy}","received_events_url":"https://api.github.com/users/MKaptein/received_events","type":"User","site_admin":false},"created_at":"2015-11-28T16:59:02Z","updated_at":"2015-11-28T16:59:02Z","body":"Jules is working on the examples and finishing base and lm; paper deadline is coming Monday, and then it should move to the master branch.... (And hence be working. And using the libs in the AB test example ;)) thanks for spotting that one!\n\nVerstuurd vanaf mijn iPhone\n\n> Op 28 nov. 2015 om 17:50 heeft Robin van Emden <notifications@github.com> het volgende geschreven:\n> \n> Same goes for something like the import of the base lib in lm.py - it states\n> \n> from list.base import *\n> Which obviously should be\n> \n> from libs.base import *\n> yet I see that a recent commit states that \"Big update, lm.py is not finished yet.\", so I might just leave this code alone and concentrate on my own LiF code?\n> \n> —\n> Reply to this email directly or view it on GitHub.\n> \n"}}