Skip to content

Commit 2c3af0f

Browse files
committed
finished annotations on bonus nb
1 parent 8c4d288 commit 2c3af0f

1 file changed

Lines changed: 33 additions & 11 deletions

File tree

notebooks/bonus-exploration-finches.ipynb

Lines changed: 33 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,13 @@
1818
"%config InlineBackend.figure_format = 'retina'"
1919
]
2020
},
21+
{
22+
"cell_type": "markdown",
23+
"metadata": {},
24+
"source": [
25+
"In this notebook, I would like to write an estimation model for beak shape. "
26+
]
27+
},
2128
{
2229
"cell_type": "code",
2330
"execution_count": null,
@@ -52,6 +59,16 @@
5259
"scandens_idx = df[df['species'] == 'scandens'].index"
5360
]
5461
},
62+
{
63+
"cell_type": "markdown",
64+
"metadata": {},
65+
"source": [
66+
"# Model : Naive Division of Posteriors\n",
67+
"\n",
68+
"- Estimate posterior for depth and length independently.\n",
69+
"- Use posterior samples to estimate distribution for shape."
70+
]
71+
},
5572
{
5673
"cell_type": "code",
5774
"execution_count": null,
@@ -186,16 +203,6 @@
186203
"plt.tight_layout()"
187204
]
188205
},
189-
{
190-
"cell_type": "code",
191-
"execution_count": null,
192-
"metadata": {},
193-
"outputs": [],
194-
"source": [
195-
"plt.hist(samples['beak_depth'].flatten())\n",
196-
"plt.hist(samples['beak_length'].flatten())"
197-
]
198-
},
199206
{
200207
"cell_type": "code",
201208
"execution_count": null,
@@ -210,6 +217,15 @@
210217
"ax.plot(x, y)"
211218
]
212219
},
220+
{
221+
"cell_type": "markdown",
222+
"metadata": {},
223+
"source": [
224+
"Ok, looks like this is not the right model. Dividing PPC samples is definitely not the right approach here.\n",
225+
"\n",
226+
"Maybe jointly modelling the observed beak and length distributions is the right thing to do?"
227+
]
228+
},
213229
{
214230
"cell_type": "code",
215231
"execution_count": null,
@@ -237,6 +253,8 @@
237253
"cell_type": "markdown",
238254
"metadata": {},
239255
"source": [
256+
"# Model: Joint Distribution\n",
257+
"\n",
240258
"Going to try a new model: we explicity model depth and length jointly, as a multivariate gaussian."
241259
]
242260
},
@@ -357,6 +375,8 @@
357375
"cell_type": "markdown",
358376
"metadata": {},
359377
"source": [
378+
"# Model: Regress Depth on Length\n",
379+
"\n",
360380
"Maybe the right way to compute shape is to regress depth on length, and compute the slope. After all, that's all that depth/length really is.\n",
361381
"\n",
362382
"We will assume a model: $y=mx$, no intercept."
@@ -409,7 +429,9 @@
409429
"source": [
410430
"I have the model mis-specified - I get the posterior distribution over the slope, but not the distribution of shapes. I guess shapes and slopes are kind of different. \n",
411431
"\n",
412-
"Let's try just estimating shape directly."
432+
"Let's try just estimating shape directly.\n",
433+
"\n",
434+
"# Model: Estimate on Shape Parameter"
413435
]
414436
},
415437
{

0 commit comments

Comments
 (0)