Skip to content

Commit 7522da7

Browse files
authored
Merge pull request #23 from AlbandeCrevoisier/master
Fix typos.
2 parents c7cb1dd + 0978812 commit 7522da7

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
@@ -281,7 +281,7 @@
281281
"cell_type": "markdown",
282282
"metadata": {},
283283
"source": [
284-
"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`]():"
284+
"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`]():"
285285
]
286286
},
287287
{
@@ -796,10 +796,10 @@
796796
" end\n",
797797
" \n",
798798
" # Run the model with new x coordinates, and with parameters \n",
799-
" # fixed to be the inferred values\n",
799+
" # fixed to be the inferred values.\n",
800800
" (new_trace, _) = Gen.generate(model, (new_xs,), constraints)\n",
801801
" \n",
802-
" # Pull out the y-values and return them\n",
802+
" # Pull out the y-values and return them.\n",
803803
" ys = [new_trace[(:y, i)] for i=1:length(new_xs)]\n",
804804
" return ys\n",
805805
"end;"
@@ -911,7 +911,7 @@
911911
"cell_type": "markdown",
912912
"metadata": {},
913913
"source": [
914-
"Now consider the same experiment run with following data set, which has significantly more noise."
914+
"Now consider the same experiment run with the following data set, which has significantly more noise."
915915
]
916916
},
917917
{
@@ -970,7 +970,7 @@
970970
"cell_type": "markdown",
971971
"metadata": {},
972972
"source": [
973-
"Then, we compare the predictions using inference the unmodified and modified model on the `ys` data set:"
973+
"Then, we compare the predictions using inference of the unmodified and modified models on the `ys` data set:"
974974
]
975975
},
976976
{
@@ -998,7 +998,7 @@
998998
"source": [
999999
"Notice that there is more uncertainty in the predictions made using the modified model.\n",
10001000
"\n",
1001-
"We also compare the predictions using inference the unmodified and modified model on the `ys_noisy` data set:"
1001+
"We also compare the predictions using inference of the unmodified and modified models on the `ys_noisy` data set:"
10021002
]
10031003
},
10041004
{
@@ -1034,7 +1034,7 @@
10341034
"-------------------------\n",
10351035
"### Exercise\n",
10361036
"\n",
1037-
"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",
1037+
"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",
10381038
"\n",
10391039
"We have provided you with starter code:"
10401040
]
@@ -1479,7 +1479,7 @@
14791479
"cell_type": "markdown",
14801480
"metadata": {},
14811481
"source": [
1482-
"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."
1482+
"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."
14831483
]
14841484
},
14851485
{
@@ -1523,7 +1523,7 @@
15231523
"cell_type": "markdown",
15241524
"metadata": {},
15251525
"source": [
1526-
"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."
1526+
"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."
15271527
]
15281528
},
15291529
{
@@ -1652,7 +1652,7 @@
16521652
"cell_type": "markdown",
16531653
"metadata": {},
16541654
"source": [
1655-
"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."
1655+
"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."
16561656
]
16571657
},
16581658
{
@@ -1677,7 +1677,7 @@
16771677
" end\n",
16781678
"end\n",
16791679
"\n",
1680-
"# Out full model\n",
1680+
"# Our full model\n",
16811681
"@gen function changepoint_model(xs::Vector{Float64})\n",
16821682
" node = @trace(generate_segments(minimum(xs), maximum(xs)), :tree)\n",
16831683
" noise = @trace(gamma(1, 1), :noise)\n",

0 commit comments

Comments
 (0)