Skip to content

Update NBs prior to 3.9.0 release #3955

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Jun 13, 2020
66 changes: 33 additions & 33 deletions docs/source/notebooks/AR.ipynb

Large diffs are not rendered by default.

315 changes: 237 additions & 78 deletions docs/source/notebooks/BEST.ipynb

Large diffs are not rendered by default.

74 changes: 58 additions & 16 deletions docs/source/notebooks/Bayes_factor.ipynb

Large diffs are not rendered by default.

1,865 changes: 886 additions & 979 deletions docs/source/notebooks/DEMetropolisZ_EfficiencyComparison.ipynb

Large diffs are not rendered by default.

1,355 changes: 641 additions & 714 deletions docs/source/notebooks/DEMetropolisZ_tune_drop_fraction.ipynb

Large diffs are not rendered by default.

1,487 changes: 1,017 additions & 470 deletions docs/source/notebooks/Diagnosing_biased_Inference_with_Divergences.ipynb

Large diffs are not rendered by default.

43 changes: 40 additions & 3 deletions docs/source/notebooks/Euler-Maruyama_and_SDEs.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,24 @@
],
"source": [
"%pylab inline\n",
"import arviz as az\n",
"import pymc3 as pm\n",
"import theano.tensor as tt \n",
"import scipy\n",
"import theano.tensor as tt\n",
"\n",
"from pymc3.distributions.timeseries import EulerMaruyama"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"%config InlineBackend.figure_format = 'retina'\n",
"az.style.use('arviz-darkgrid')"
]
},
{
"cell_type": "markdown",
"metadata": {
Expand Down Expand Up @@ -751,6 +763,31 @@
"plot(zs, 'r', label='$z(t)$')\n",
"legend()"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"pymc3 3.8\n",
"arviz 0.8.3\n",
"numpy 1.17.5\n",
"last updated: Thu Jun 11 2020 \n",
"\n",
"CPython 3.8.2\n",
"IPython 7.11.0\n",
"watermark 2.0.2\n"
]
}
],
"source": [
"%load_ext watermark\n",
"%watermark -n -u -v -iv -w"
]
}
],
"metadata": {
Expand All @@ -770,7 +807,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.7"
"version": "3.8.2"
},
"latex_envs": {
"bibliofile": "biblio.bib",
Expand Down Expand Up @@ -1600,5 +1637,5 @@
}
},
"nbformat": 4,
"nbformat_minor": 1
"nbformat_minor": 4
}
188 changes: 149 additions & 39 deletions docs/source/notebooks/GLM-hierarchical-advi-minibatch.ipynb

Large diffs are not rendered by default.

192 changes: 146 additions & 46 deletions docs/source/notebooks/GLM-hierarchical-binominal-model.ipynb

Large diffs are not rendered by default.

52 changes: 48 additions & 4 deletions docs/source/notebooks/GLM-hierarchical.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,32 @@
"metadata": {},
"outputs": [],
"source": [
"%matplotlib inline\n",
"import arviz as az\n",
"import matplotlib.pyplot as plt\n",
"import numpy as np\n",
"import pymc3 as pm \n",
"import pandas as pd\n",
"import pymc3 as pm \n",
"import theano\n",
"\n",
"print('Running on PyMC3 v{}'.format(pm.__version__))"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"%config InlineBackend.figure_format = 'retina'\n",
"az.style.use('arviz-darkgrid')"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"data = pd.read_csv(pm.get_data('radon.csv'))\n",
"data['log_radon'] = data['log_radon'].astype(theano.config.floatX)\n",
"county_names = data.county.unique()\n",
Expand Down Expand Up @@ -553,6 +572,31 @@
"### Acknowledgements\n",
"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."
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"pymc3 3.8\n",
"arviz 0.8.3\n",
"numpy 1.17.5\n",
"last updated: Thu Jun 11 2020 \n",
"\n",
"CPython 3.8.2\n",
"IPython 7.11.0\n",
"watermark 2.0.2\n"
]
}
],
"source": [
"%load_ext watermark\n",
"%watermark -n -u -v -iv -w"
]
}
],
"metadata": {
Expand All @@ -572,7 +616,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.5"
"version": "3.8.2"
},
"latex_envs": {
"bibliofile": "biblio.bib",
Expand All @@ -583,5 +627,5 @@
}
},
"nbformat": 4,
"nbformat_minor": 2
"nbformat_minor": 4
}
195 changes: 163 additions & 32 deletions docs/source/notebooks/GLM-linear.ipynb

Large diffs are not rendered by default.

72 changes: 49 additions & 23 deletions docs/source/notebooks/GLM-logistic.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -21,26 +21,33 @@
"metadata": {},
"outputs": [],
"source": [
"%matplotlib inline\n",
"import pandas as pd\n",
"import arviz as az\n",
"import matplotlib.pyplot as plt\n",
"import numpy as np\n",
"import pandas as pd\n",
"import pymc3 as pm\n",
"import matplotlib.pyplot as plt\n",
"import seaborn\n",
"import theano as thno\n",
"import theano.tensor as T\n",
"import warnings\n",
"warnings.filterwarnings('ignore')\n",
"from collections import OrderedDict\n",
"from time import time\n",
"\n",
"import numpy as np\n",
"import pandas as pd\n",
"import matplotlib.pyplot as plt\n",
"\n",
"from collections import OrderedDict\n",
"from scipy.optimize import fmin_powell\n",
"from scipy import integrate\n",
"from time import time\n",
"\n",
"import theano as thno\n",
"import theano.tensor as T"
"print('Running on PyMC3 v{}'.format(pm.__version__))"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"%config InlineBackend.figure_format = 'retina'\n",
"warnings.filterwarnings('ignore')\n",
"az.style.use('arviz-darkgrid')"
]
},
{
Expand Down Expand Up @@ -420,9 +427,7 @@
{
"cell_type": "code",
"execution_count": 6,
"metadata": {
"scrolled": false
},
"metadata": {},
"outputs": [
{
"data": {
Expand Down Expand Up @@ -952,9 +957,7 @@
},
{
"cell_type": "markdown",
"metadata": {
"collapsed": true
},
"metadata": {},
"source": [
"## Model selection \n",
"\n",
Expand Down Expand Up @@ -1066,12 +1069,35 @@
},
{
"cell_type": "markdown",
"metadata": {
"collapsed": true
},
"metadata": {},
"source": [
"WAIC confirms our decision to use age^2. "
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"pymc3 3.8\n",
"arviz 0.8.3\n",
"numpy 1.17.5\n",
"last updated: Thu Jun 11 2020 \n",
"\n",
"CPython 3.8.2\n",
"IPython 7.11.0\n",
"watermark 2.0.2\n"
]
}
],
"source": [
"%load_ext watermark\n",
"%watermark -n -u -v -iv -w"
]
}
],
"metadata": {
Expand All @@ -1091,7 +1117,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.7"
"version": "3.8.2"
},
"latex_envs": {
"bibliofile": "biblio.bib",
Expand All @@ -1102,5 +1128,5 @@
}
},
"nbformat": 4,
"nbformat_minor": 1
"nbformat_minor": 4
}
49 changes: 42 additions & 7 deletions docs/source/notebooks/GLM-model-selection.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,27 @@
}
],
"source": [
"%matplotlib inline\n",
"import pymc3 as pm\n",
"import arviz as az\n",
"import matplotlib.pyplot as plt\n",
"import numpy as np\n",
"import pandas as pd\n",
"import matplotlib.pyplot as plt\n",
"import pymc3 as pm\n",
"import seaborn as sns\n",
"\n",
"from collections import OrderedDict\n",
"from ipywidgets import interactive, fixed\n",
"\n",
"plt.style.use('seaborn-darkgrid')\n",
"print('Running on PyMC3 v{}'.format(pm.__version__))\n",
"print('Running on PyMC3 v{}'.format(pm.__version__))"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"%config InlineBackend.figure_format = 'retina'\n",
"az.style.use('arviz-darkgrid')\n",
"rndst = np.random.RandomState(0)"
]
},
Expand Down Expand Up @@ -1541,6 +1551,31 @@
"source": [
"Example originally contributed by Jonathan Sedar 2016-01-09 [github.com/jonsedar](https://github.com/jonsedar). Edited by Junpeng Lao 2017-07-6 [github.com/junpenglao](https://github.com/junpenglao)"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"pymc3 3.8\n",
"arviz 0.8.3\n",
"numpy 1.17.5\n",
"last updated: Thu Jun 11 2020 \n",
"\n",
"CPython 3.8.2\n",
"IPython 7.11.0\n",
"watermark 2.0.2\n"
]
}
],
"source": [
"%load_ext watermark\n",
"%watermark -n -u -v -iv -w"
]
}
],
"metadata": {
Expand All @@ -1560,7 +1595,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.5"
"version": "3.8.2"
},
"widgets": {
"state": {
Expand All @@ -1583,5 +1618,5 @@
}
},
"nbformat": 4,
"nbformat_minor": 2
"nbformat_minor": 4
}
Loading