Skip to content

Commit 1572cc3

Browse files
authored
Add punctuation to WorkingWithInferenceData.ipynb (#2436)
1 parent 6fabf27 commit 1572cc3

File tree

1 file changed

+20
-16
lines changed

1 file changed

+20
-16
lines changed

doc/source/getting_started/WorkingWithInferenceData.ipynb

+20-16
Original file line numberDiff line numberDiff line change
@@ -4913,10 +4913,10 @@
49134913
"metadata": {},
49144914
"source": [
49154915
"You can also use {meth}`xarray.Dataset.stack` if you only want to combine the chain and draw dimensions. {func}`arviz.extract` is a convenience function aimed at taking care of the most common subsetting operations with MCMC samples. It can:\n",
4916-
"- Combine chains and draws\n",
4917-
"- Return a subset of variables (with optional filtering with regular expressions or string matching)\n",
4918-
"- Return a subset of samples. Moreover by default it returns a random subset to prevent getting non-representative samples due to bad mixing.\n",
4919-
"- Access any group"
4916+
"- Combine chains and draws.\n",
4917+
"- Return a subset of variables (with optional filtering with regular expressions or string matching).\n",
4918+
"- Return a subset of samples. Moreover, by default it returns a random subset to prevent getting non-representative samples due to bad mixing.\n",
4919+
"- Access any group."
49204920
]
49214921
},
49224922
{
@@ -5573,7 +5573,7 @@
55735573
"metadata": {},
55745574
"source": [
55755575
":::{tip}\n",
5576-
"Use a random seed to get the same subset from multiple groups: `az.extract(idata, num_samples=100, rng=3)` and `az.extract(idata, group=\"log_likelihood\", num_samples=100, rng=3)` will continue to have matching samples\n",
5576+
"Use a random seed to get the same subset from multiple groups: `az.extract(idata, num_samples=100, rng=3)` and `az.extract(idata, group=\"log_likelihood\", num_samples=100, rng=3)` will continue to have matching samples.\n",
55775577
":::"
55785578
]
55795579
},
@@ -5642,7 +5642,7 @@
56425642
"source": [
56435643
"## Get coordinate values\n",
56445644
"\n",
5645-
"What are the names of the groups in our hierarchical model? You can access them from the coordinate name `school` in this case"
5645+
"What are the names of the groups in our hierarchical model? You can access them from the coordinate name `school` in this case:"
56465646
]
56475647
},
56485648
{
@@ -17648,7 +17648,7 @@
1764817648
"\n",
1764917649
"You can use xarray for these pushforward operations and store them as a new variable in the posterior group. You'll then be able to plot them with ArviZ functions, calculate stats and diagnostics on them (like the {func}`~arviz.mcse`) or save and share the inferencedata object with the pushforward quantities included. \n",
1765017650
"\n",
17651-
"Compute the rolling mean of $\\log(\\tau)$ with {meth}`xarray.DataArray.rolling`, storing the result in the posterior"
17651+
"Compute the rolling mean of $\\log(\\tau)$ with {meth}`xarray.DataArray.rolling`, storing the result in the posterior:"
1765217652
]
1765317653
},
1765417654
{
@@ -17701,7 +17701,7 @@
1770117701
"```\n",
1770217702
":::\n",
1770317703
"\n",
17704-
"The `theta_shool_diff` variable in the posterior has kept the named dimensions and coordinates:"
17704+
"The `theta_school_diff` variable in the posterior has kept the named dimensions and coordinates:"
1770517705
]
1770617706
},
1770717707
{
@@ -18641,7 +18641,7 @@
1864118641
"cell_type": "markdown",
1864218642
"metadata": {},
1864318643
"source": [
18644-
"For more advanced subsetting (the equivalent to what is sometimes called \"fancy indexing\" in NumPy) you need to provide the indices as {class}`~xarray.DataArray` objects:"
18644+
"For more advanced subsetting (the equivalent to what is sometimes called \"fancy indexing\" in NumPy), you need to provide the indices as {class}`~xarray.DataArray` objects:"
1864518645
]
1864618646
},
1864718647
{
@@ -19093,7 +19093,7 @@
1909319093
"cell_type": "markdown",
1909419094
"metadata": {},
1909519095
"source": [
19096-
"Using lists or NumPy arrays instead of DataArrays does colum/row based indexing. As you can see, the result has 9 values of `theta_shool_diff` instead of the 3 pairs of difference we selected in the previous cell:"
19096+
"Using lists or NumPy arrays instead of DataArrays does colum/row based indexing. As you can see, the result has 9 values of `theta_school_diff` instead of the 3 pairs of difference we selected in the previous cell:"
1909719097
]
1909819098
},
1909919099
{
@@ -19550,7 +19550,11 @@
1955019550
},
1955119551
{
1955219552
"cell_type": "markdown",
19553-
"metadata": {},
19553+
"metadata": {
19554+
"jupyter": {
19555+
"source_hidden": true
19556+
}
19557+
},
1955419558
"source": [
1955519559
"## Add new chains using concat"
1955619560
]
@@ -27957,7 +27961,7 @@
2795727961
"cell_type": "markdown",
2795827962
"metadata": {},
2795927963
"source": [
27960-
"You can also pass a lambda function in `map`"
27964+
"You can also pass a lambda function in `map`."
2796127965
]
2796227966
},
2796327967
{
@@ -32040,7 +32044,7 @@
3204032044
"cell_type": "markdown",
3204132045
"metadata": {},
3204232046
"source": [
32043-
"You can also add extra coordinates using `map`"
32047+
"You can also add extra coordinates using `map`."
3204432048
]
3204532049
},
3204632050
{
@@ -36122,9 +36126,9 @@
3612236126
],
3612336127
"metadata": {
3612436128
"kernelspec": {
36125-
"display_name": "Python 3 (ipykernel)",
36129+
"display_name": "Python [conda env:base] *",
3612636130
"language": "python",
36127-
"name": "python3"
36131+
"name": "conda-base-py"
3612836132
},
3612936133
"language_info": {
3613036134
"codemirror_mode": {
@@ -36136,7 +36140,7 @@
3613636140
"name": "python",
3613736141
"nbconvert_exporter": "python",
3613836142
"pygments_lexer": "ipython3",
36139-
"version": "3.11.8"
36143+
"version": "3.11.5"
3614036144
},
3614136145
"varInspector": {
3614236146
"cols": {

0 commit comments

Comments
 (0)