|
860 | 860 | "\n",
|
861 | 861 | "- Hierarchical algorithms: We can setup a Bayesian Bandit algorithm on top of smaller bandit algorithms. Suppose we have $N$ Bayesian Bandit models, each varying in some behavior (for example different `rate` parameters, representing varying sensitivity to changing environments). On top of these $N$ models is another Bayesian Bandit learner that will select a sub-Bayesian Bandit. This chosen Bayesian Bandit will then make an internal choice as to which machine to pull. The super-Bayesian Bandit updates itself depending on whether the sub-Bayesian Bandit was correct or not. \n",
|
862 | 862 | "\n",
|
863 |
| - "- Extending the rewards, denoted $y_a$ for bandit $a$, to random variables from a distribution $f_{y_a}(y)$ is straightforward. More generally, this problem can be rephrased as \"Find the bandit with the largest expected value\", as playing the bandit with the largest expected value is optimal. In the case above, $f_{y_a}$ was Bernoulli with probability $p_a$, hence the expected value for a bandit is equal to $p_a$, which is why it looks like we are aiming to maximize the probability of winning. If $f$ is not Bernoulli, and it is non-negative, which can be accomplished apriori by shifting the distribution (we assume we know $f$), then the algorithm behaves as before:\n", |
| 863 | + "- Extending the rewards, denoted $y_a$ for bandit $a$, to random variables from a distribution $f_{y_a}(y)$ is straightforward. More generally, this problem can be rephrased as \"Find the bandit with the largest expected value\", as playing the bandit with the largest expected value is optimal. In the case above, $f_{y_a}$ was Bernoulli with probability $p_a$, hence the expected value for a bandit is equal to $p_a$, which is why it looks like we are aiming to maximize the probability of winning. If $f$ is not Bernoulli, and it is non-negative, which can be accomplished a priori by shifting the distribution (we assume we know $f$), then the algorithm behaves as before:\n", |
864 | 864 | "\n",
|
865 | 865 | " For each round, \n",
|
866 | 866 | " \n",
|
|
4924 | 4924 | "Peadar is known as @springcoil on Twitter and is an Irish Data Scientist with a Mathematical focus, he is currently based in Luxembourg. \n",
|
4925 | 4925 | "I came across the following blog post on http://danielweitzenfeld.github.io/passtheroc/blog/2014/10/28/bayes-premier-league/ \n",
|
4926 | 4926 | "I quote from him, about his realization about Premier League Football -\n",
|
4927 |
| - "_It occurred to me that this problem is perfect for a Bayesian model. We want to infer the latent paremeters (every team's strength) that are generating the data we observe (the scorelines). Moreover, we know that the scorelines are a noisy measurement of team strength, so ideally, we want a model that makes it easy to quantify our uncertainty about the underlying strengths.\n", |
| 4927 | + "_It occurred to me that this problem is perfect for a Bayesian model. We want to infer the latent parameters (every team's strength) that are generating the data we observe (the scorelines). Moreover, we know that the scorelines are a noisy measurement of team strength, so ideally, we want a model that makes it easy to quantify our uncertainty about the underlying strengths.\n", |
4928 | 4928 | "\n",
|
4929 | 4929 | "_So I googled 'Bayesian football' and found this paper, called 'Bayesian hierarchical model for the prediction of football results.' The authors (Gianluca Baio and Marta A. Blangiardo) being Italian, though, the 'football' here is soccer._\n",
|
4930 | 4930 | "\n",
|
|
5238 | 5238 | " tau=tau_def, \n",
|
5239 | 5239 | " size=num_teams, \n",
|
5240 | 5240 | " value=def_starting_points.values) \n",
|
5241 |
| - "# trick to code the sum to zero contraint\n", |
| 5241 | + "# trick to code the sum to zero constraint\n", |
5242 | 5242 | "@pymc.deterministic\n",
|
5243 | 5243 | "def atts(atts_star=atts_star):\n",
|
5244 | 5244 | " atts = atts_star.copy()\n",
|
|
0 commit comments