Skip to content

Commit 92863c9

Browse files
committed
added radioactive decay model diagram and explanation on link function
1 parent f1cc91b commit 92863c9

6 files changed

Lines changed: 18 additions & 7 deletions
739 KB
Binary file not shown.

images/radioactive-decay-model.jpg

685 KB
Loading

images/radioactive-decay-model.pdf

768 KB
Binary file not shown.

notebooks/06-instructor-hierarchical-baseball.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,10 @@
5252
"cell_type": "markdown",
5353
"metadata": {},
5454
"source": [
55-
"## Betas, bernoullis and binomials: A brief introduction\n",
55+
"## Betas, Bernoullis and Binomials: A brief introduction\n",
5656
"\n",
5757
"- Bernoulli distribution: a probability distribution modelling one \"coin flip\"-like trial. Parameterized by a single parameter `p`, which indicates probability of \"success\".\n",
58-
"- Binomail distribution: a probability distribution modelling the number of successes in `n` trials. Parameterized by both `n` and `p`.\n",
58+
"- Binomial distribution: a probability distribution modelling the number of successes in `n` trials. Parameterized by both `n` and `p`.\n",
5959
"- Beta distributions: a probability distribution bounded over the interval $(0, 1)$. Models distribution of probability values, usually the `p` in a Bernoulli or Binomial. Parameterized by $\\alpha$ and $\\beta$, which can be thought of as \"number of successes\" and \"number of failures\" respectively.\n",
6060
"\n",
6161
"Every distribution has its \"story\". If you're curious, check out [Justin Bois' probability stories][probstory] page.\n",

notebooks/06-student-hierarchical-baseball.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,10 @@
5252
"cell_type": "markdown",
5353
"metadata": {},
5454
"source": [
55-
"## Betas, bernoullis and binomials: A brief introduction\n",
55+
"## Betas, Bernoullis and Binomials: A brief introduction\n",
5656
"\n",
5757
"- Bernoulli distribution: a probability distribution modelling one \"coin flip\"-like trial. Parameterized by a single parameter `p`, which indicates probability of \"success\".\n",
58-
"- Binomail distribution: a probability distribution modelling the number of successes in `n` trials. Parameterized by both `n` and `p`.\n",
58+
"- Binomial distribution: a probability distribution modelling the number of successes in `n` trials. Parameterized by both `n` and `p`.\n",
5959
"- Beta distributions: a probability distribution bounded over the interval $(0, 1)$. Models distribution of probability values, usually the `p` in a Bernoulli or Binomial. Parameterized by $\\alpha$ and $\\beta$, which can be thought of as \"number of successes\" and \"number of failures\" respectively.\n",
6060
"\n",
6161
"Every distribution has its \"story\". If you're curious, check out [Justin Bois' probability stories][probstory] page.\n",

notebooks/08-bayesian-curve-regression.ipynb

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,17 @@
7777
"- What are the key parameters that we need to worry about?\n",
7878
"- What might be justifiable priors for them?\n",
7979
"\n",
80-
"**Exercise:** Implement the model."
80+
"## Link Functions\n",
81+
"\n",
82+
"If we were to draw out a model for the curve above, it might look like this:\n",
83+
"\n",
84+
"![](../images/radioactive-decay-model.jpg)\n",
85+
"\n",
86+
"The most important part of this diagram is the \"link function\" - this is what \"links\" the data to the output. In this case, we've used the exponential decay curve as the link function, but if you were doing a linear regression model, all you would have to do is to change the link function for the $y=mx+c$ \"straight curve\", and do another curve fit with the appropriate priors for $m$ and $c$.\n",
87+
"\n",
88+
"If you're familiar with the mathematical groundings of deep learning, you'll immediately recognize that a deep neural network model is merely another instance of a really complicated link function that links the input data $x$ to the observed data $y$, with the model weights and biases corresponding to the parameters (let's collectively call this set of parameters $\\theta$).\n",
89+
"\n",
90+
"**Exercise:** Now that you've seen a pictorial description of the model, implement it below in PyMC3."
8191
]
8292
},
8393
{
@@ -140,17 +150,18 @@
140150
"\n",
141151
"- In lieu of showing you a \"straight curve\" (line) fit, you've now seen an arbitrary curve fit.\n",
142152
"- As long as you can find a way to parameterize the curve with a function, you can perform inference on the curve's parameters.\n",
143-
"- The function that you are modelling is the \"link function\" that provides the link between the parameters, data and the output.\n",
153+
"- That function is called the \"link function\", which provides the link between the parameters, data and the output.\n",
144154
"\n",
145155
"More generally, if\n",
146156
"\n",
147157
"$$y = f(x, \\theta)$$\n",
148158
"\n",
149159
"where $\\theta$ are merely a set of parameters, then you can perform inference on the curve's parameters $\\theta$. To make this clear:\n",
150160
"\n",
151-
"| curve name | functional form | parameters $\\theta$ |\n",
161+
"| curve name | functional form | parameters |\n",
152162
"|------------|-----------------|---------------------|\n",
153163
"| exponential decay | $y = Ae^{-t/\\tau} + C$ | $A$, $\\tau$, $C$|\n",
164+
"| sine curves | $y = A\\sin(\\omega x + \\phi)$ | $A$, $\\omega$, $\\phi$ |\n",
154165
"| linear regression | $y = mx + c$ | $m$, $c$ |\n",
155166
"| logistic regression | $y = L(mx + c)$ | $m$, $c$ |\n",
156167
"| 4-parameter IC50 | $y = \\frac{a - i}{1 + 10^{\\beta(log(\\tau) - x)}} + i$ | $a$, $i$, $\\tau$, $\\beta$ |\n",

0 commit comments

Comments
 (0)