|
77 | 77 | "- What are the key parameters that we need to worry about?\n", |
78 | 78 | "- What might be justifiable priors for them?\n", |
79 | 79 | "\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 | + "\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." |
81 | 91 | ] |
82 | 92 | }, |
83 | 93 | { |
|
140 | 150 | "\n", |
141 | 151 | "- In lieu of showing you a \"straight curve\" (line) fit, you've now seen an arbitrary curve fit.\n", |
142 | 152 | "- 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", |
144 | 154 | "\n", |
145 | 155 | "More generally, if\n", |
146 | 156 | "\n", |
147 | 157 | "$$y = f(x, \\theta)$$\n", |
148 | 158 | "\n", |
149 | 159 | "where $\\theta$ are merely a set of parameters, then you can perform inference on the curve's parameters $\\theta$. To make this clear:\n", |
150 | 160 | "\n", |
151 | | - "| curve name | functional form | parameters $\\theta$ |\n", |
| 161 | + "| curve name | functional form | parameters |\n", |
152 | 162 | "|------------|-----------------|---------------------|\n", |
153 | 163 | "| exponential decay | $y = Ae^{-t/\\tau} + C$ | $A$, $\\tau$, $C$|\n", |
| 164 | + "| sine curves | $y = A\\sin(\\omega x + \\phi)$ | $A$, $\\omega$, $\\phi$ |\n", |
154 | 165 | "| linear regression | $y = mx + c$ | $m$, $c$ |\n", |
155 | 166 | "| logistic regression | $y = L(mx + c)$ | $m$, $c$ |\n", |
156 | 167 | "| 4-parameter IC50 | $y = \\frac{a - i}{1 + 10^{\\beta(log(\\tau) - x)}} + i$ | $a$, $i$, $\\tau$, $\\beta$ |\n", |
|
0 commit comments