Skip to content

Commit f113f21

Browse files
committed
Fix syntax error and add observed data to assignment model
1 parent 98a19d2 commit f113f21

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Chapter3_MCMC/IntroMCMC.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@
466466
"observations = pm.Normal(\"obs\", center_i, tau_i, value=data, observed=True)\n",
467467
"\n",
468468
"# below we create a model class\n",
469-
"model = pm.Model([p, assignment, taus, centers])\n"
469+
"model = pm.Model([p, assignment, observations, taus, centers])\n"
470470
],
471471
"language": "python",
472472
"metadata": {},
@@ -529,7 +529,7 @@
529529
"center_trace = mcmc.trace(\"centers\")[:]\n",
530530
"\n",
531531
"# for pretty colors later in the book.\n",
532-
"colors = [\"#348ABD\", \"#A60628\"]\n",
532+
"colors = [\"#348ABD\", \"#A60628\"] \\\n",
533533
"if center_trace[-1, 0] > center_trace[-1, 1] \\\n",
534534
" else [\"#A60628\", \"#348ABD\"]\n",
535535
"\n",

0 commit comments

Comments
 (0)