Skip to content

Commit 0978812

Browse files
Correct various typos.
1 parent 742464e commit 0978812

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

tutorials/Introduction to Modeling in Gen.ipynb

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@
289289
"cell_type": "markdown",
290290
"metadata": {},
291291
"source": [
292-
"The trace also contains the value of the random choices, stored in map from address to value called a *choice map*. This map is available through the API method [`get_choices`]():"
292+
"The trace also contains the value of the random choices, stored in a map from address to value called a *choice map*. This map is available through the API method [`get_choices`]():"
293293
]
294294
},
295295
{
@@ -808,10 +808,10 @@
808808
" end\n",
809809
" \n",
810810
" # Run the model with new x coordinates, and with parameters \n",
811-
" # fixed to be the inferred values\n",
811+
" # fixed to be the inferred values.\n",
812812
" (new_trace, _) = Gen.generate(model, (new_xs,), constraints)\n",
813813
" \n",
814-
" # Pull out the y-values and return them\n",
814+
" # Pull out the y-values and return them.\n",
815815
" ys = [new_trace[(:y, i)] for i=1:length(new_xs)]\n",
816816
" return ys\n",
817817
"end;"
@@ -929,7 +929,7 @@
929929
"cell_type": "markdown",
930930
"metadata": {},
931931
"source": [
932-
"Now consider the same experiment run with following data set, which has significantly more noise."
932+
"Now consider the same experiment run with the following data set, which has significantly more noise."
933933
]
934934
},
935935
{
@@ -994,7 +994,7 @@
994994
"cell_type": "markdown",
995995
"metadata": {},
996996
"source": [
997-
"Then, we compare the predictions using inference the unmodified and modified model on the `ys` data set:"
997+
"Then, we compare the predictions using inference of the unmodified and modified models on the `ys` data set:"
998998
]
999999
},
10001000
{
@@ -1024,7 +1024,7 @@
10241024
"source": [
10251025
"Notice that there is more uncertainty in the predictions made using the modified model.\n",
10261026
"\n",
1027-
"We also compare the predictions using inference the unmodified and modified model on the `ys_noisy` data set:"
1027+
"We also compare the predictions using inference of the unmodified and modified models on the `ys_noisy` data set:"
10281028
]
10291029
},
10301030
{
@@ -1062,7 +1062,7 @@
10621062
"-------------------------\n",
10631063
"### Exercise\n",
10641064
"\n",
1065-
"Write a modified version the sine model that makes noise into a random choice. Compare the predicted data with the observed data `infer_and_predict` and `plot_predictions` for the unmodified and modified model, and for the `ys_sine` and `ys_noisy` datasets. Discuss the results. Experiment with the amount of inference computation used. The amount of inference computation will need to be higher for the model with the noise random choice.\n",
1065+
"Write a modified version of the sine model that makes noise into a random choice. Compare the predicted data with the observed data using `infer_and_predict` and `plot_predictions` for the unmodified and modified models, and for the `ys_sine` and `ys_noisy` data sets. Discuss the results. Experiment with the amount of inference computation used. The amount of inference computation will need to be higher for the model with the noise as a random choice.\n",
10661066
"\n",
10671067
"We have provided you with starter code:"
10681068
]
@@ -1521,7 +1521,7 @@
15211521
"cell_type": "markdown",
15221522
"metadata": {},
15231523
"source": [
1524-
"Gen's built-in modeling language can be used to express models that use an unbounded number of parameters. This section walks you through development of a model of data that does not a-priori specify an upper bound on the complexity of the model, but instead infers the complexity of the model as well as the parameters. This is a simple example of a *Bayesian nonparametric* model."
1524+
"Gen's built-in modeling language can be used to express models that use an unbounded number of parameters. This section walks you through development of a model of data that does not a priori specify an upper bound on the complexity of the model, but instead infers the complexity of the model as well as the parameters. This is a simple example of a *Bayesian nonparametric* model."
15251525
]
15261526
},
15271527
{
@@ -1569,7 +1569,7 @@
15691569
"cell_type": "markdown",
15701570
"metadata": {},
15711571
"source": [
1572-
"The data set on the left appears to be best explained as a contant function with some noise. The data set on the right appears to include two changepoints, with a constant function in between the changepoints. We want a model that does not a-priori choose the number of changepoints in the data. To do this, we will recursively partition the interval into regions. We define a Julia data structure that represents a binary tree of intervals; each leaf node represents a region in which the function is constant."
1572+
"The data set on the left appears to be best explained as a contant function with some noise. The data set on the right appears to include two changepoints, with a constant function in between the changepoints. We want a model that does not a priori choose the number of changepoints in the data. To do this, we will recursively partition the interval into regions. We define a Julia data structure that represents a binary tree of intervals; each leaf node represents a region in which the function is constant."
15731573
]
15741574
},
15751575
{
@@ -1708,7 +1708,7 @@
17081708
"cell_type": "markdown",
17091709
"metadata": {},
17101710
"source": [
1711-
"Now that we have generative function that generates a random piecewise-constant function, we write a model that adds noise to the resulting constant functions to generate a data set of y-coordinates. The noise level will be a random choice."
1711+
"Now that we have a generative function that generates a random piecewise-constant function, we write a model that adds noise to the resulting constant functions to generate a data set of y-coordinates. The noise level will be a random choice."
17121712
]
17131713
},
17141714
{
@@ -1735,7 +1735,7 @@
17351735
" end\n",
17361736
"end\n",
17371737
"\n",
1738-
"# Out full model\n",
1738+
"# Our full model\n",
17391739
"@gen function changepoint_model(xs::Vector{Float64})\n",
17401740
" node = @trace(generate_segments(minimum(xs), maximum(xs)), :tree)\n",
17411741
" noise = @trace(gamma(1, 1), :noise)\n",

0 commit comments

Comments
 (0)