Skip to content

Commit 8274b91

Browse files
Update NBs prior to 3.9.0 release (#3955)
* Re-run and fix many notebooks... Co-authored-by: Michael Osthege <[email protected]>
1 parent cfa56a4 commit 8274b91

File tree

74 files changed

+11986
-5609
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+11986
-5609
lines changed

docs/source/notebooks/AR.ipynb

Lines changed: 33 additions & 33 deletions
Large diffs are not rendered by default.

docs/source/notebooks/BEST.ipynb

Lines changed: 237 additions & 78 deletions
Large diffs are not rendered by default.

docs/source/notebooks/Bayes_factor.ipynb

Lines changed: 58 additions & 16 deletions
Large diffs are not rendered by default.

docs/source/notebooks/DEMetropolisZ_EfficiencyComparison.ipynb

Lines changed: 886 additions & 979 deletions
Large diffs are not rendered by default.

docs/source/notebooks/DEMetropolisZ_tune_drop_fraction.ipynb

Lines changed: 641 additions & 714 deletions
Large diffs are not rendered by default.

docs/source/notebooks/Diagnosing_biased_Inference_with_Divergences.ipynb

Lines changed: 1017 additions & 470 deletions
Large diffs are not rendered by default.

docs/source/notebooks/Euler-Maruyama_and_SDEs.ipynb

Lines changed: 40 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,24 @@
4242
],
4343
"source": [
4444
"%pylab inline\n",
45+
"import arviz as az\n",
4546
"import pymc3 as pm\n",
46-
"import theano.tensor as tt \n",
4747
"import scipy\n",
48+
"import theano.tensor as tt\n",
49+
"\n",
4850
"from pymc3.distributions.timeseries import EulerMaruyama"
4951
]
5052
},
53+
{
54+
"cell_type": "code",
55+
"execution_count": null,
56+
"metadata": {},
57+
"outputs": [],
58+
"source": [
59+
"%config InlineBackend.figure_format = 'retina'\n",
60+
"az.style.use('arviz-darkgrid')"
61+
]
62+
},
5163
{
5264
"cell_type": "markdown",
5365
"metadata": {
@@ -751,6 +763,31 @@
751763
"plot(zs, 'r', label='$z(t)$')\n",
752764
"legend()"
753765
]
766+
},
767+
{
768+
"cell_type": "code",
769+
"execution_count": 10,
770+
"metadata": {},
771+
"outputs": [
772+
{
773+
"name": "stdout",
774+
"output_type": "stream",
775+
"text": [
776+
"pymc3 3.8\n",
777+
"arviz 0.8.3\n",
778+
"numpy 1.17.5\n",
779+
"last updated: Thu Jun 11 2020 \n",
780+
"\n",
781+
"CPython 3.8.2\n",
782+
"IPython 7.11.0\n",
783+
"watermark 2.0.2\n"
784+
]
785+
}
786+
],
787+
"source": [
788+
"%load_ext watermark\n",
789+
"%watermark -n -u -v -iv -w"
790+
]
754791
}
755792
],
756793
"metadata": {
@@ -770,7 +807,7 @@
770807
"name": "python",
771808
"nbconvert_exporter": "python",
772809
"pygments_lexer": "ipython3",
773-
"version": "3.6.7"
810+
"version": "3.8.2"
774811
},
775812
"latex_envs": {
776813
"bibliofile": "biblio.bib",
@@ -1600,5 +1637,5 @@
16001637
}
16011638
},
16021639
"nbformat": 4,
1603-
"nbformat_minor": 1
1640+
"nbformat_minor": 4
16041641
}

docs/source/notebooks/GLM-hierarchical-advi-minibatch.ipynb

Lines changed: 149 additions & 39 deletions
Large diffs are not rendered by default.

docs/source/notebooks/GLM-hierarchical-binominal-model.ipynb

Lines changed: 146 additions & 46 deletions
Large diffs are not rendered by default.

docs/source/notebooks/GLM-hierarchical.ipynb

Lines changed: 48 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,32 @@
5252
"metadata": {},
5353
"outputs": [],
5454
"source": [
55-
"%matplotlib inline\n",
55+
"import arviz as az\n",
5656
"import matplotlib.pyplot as plt\n",
5757
"import numpy as np\n",
58-
"import pymc3 as pm \n",
5958
"import pandas as pd\n",
59+
"import pymc3 as pm \n",
6060
"import theano\n",
6161
"\n",
62+
"print('Running on PyMC3 v{}'.format(pm.__version__))"
63+
]
64+
},
65+
{
66+
"cell_type": "code",
67+
"execution_count": null,
68+
"metadata": {},
69+
"outputs": [],
70+
"source": [
71+
"%config InlineBackend.figure_format = 'retina'\n",
72+
"az.style.use('arviz-darkgrid')"
73+
]
74+
},
75+
{
76+
"cell_type": "code",
77+
"execution_count": null,
78+
"metadata": {},
79+
"outputs": [],
80+
"source": [
6281
"data = pd.read_csv(pm.get_data('radon.csv'))\n",
6382
"data['log_radon'] = data['log_radon'].astype(theano.config.floatX)\n",
6483
"county_names = data.county.unique()\n",
@@ -553,6 +572,31 @@
553572
"### Acknowledgements\n",
554573
"Thanks to [Imri Sofer](http://serre-lab.clps.brown.edu/person/imri-sofer/) for feedback and teaching us about the connections to random-effects models and [Dan Dillon](http://cdasr.mclean.harvard.edu/index.php/about-us/current-lab-members/14-faculty/62-daniel-dillon) for useful comments on an earlier draft."
555574
]
575+
},
576+
{
577+
"cell_type": "code",
578+
"execution_count": 10,
579+
"metadata": {},
580+
"outputs": [
581+
{
582+
"name": "stdout",
583+
"output_type": "stream",
584+
"text": [
585+
"pymc3 3.8\n",
586+
"arviz 0.8.3\n",
587+
"numpy 1.17.5\n",
588+
"last updated: Thu Jun 11 2020 \n",
589+
"\n",
590+
"CPython 3.8.2\n",
591+
"IPython 7.11.0\n",
592+
"watermark 2.0.2\n"
593+
]
594+
}
595+
],
596+
"source": [
597+
"%load_ext watermark\n",
598+
"%watermark -n -u -v -iv -w"
599+
]
556600
}
557601
],
558602
"metadata": {
@@ -572,7 +616,7 @@
572616
"name": "python",
573617
"nbconvert_exporter": "python",
574618
"pygments_lexer": "ipython3",
575-
"version": "3.6.5"
619+
"version": "3.8.2"
576620
},
577621
"latex_envs": {
578622
"bibliofile": "biblio.bib",
@@ -583,5 +627,5 @@
583627
}
584628
},
585629
"nbformat": 4,
586-
"nbformat_minor": 2
630+
"nbformat_minor": 4
587631
}

0 commit comments

Comments
 (0)