Skip to content

Commit

Permalink
🎉 Finish residual replacement for Pymc3 plots to arviz & sigma param …
Browse files Browse the repository at this point in the history
…change
  • Loading branch information
CloudChaoszero committed Jan 18, 2021
1 parent 62da398 commit 8593e05
Show file tree
Hide file tree
Showing 22 changed files with 45 additions and 57 deletions.
5 changes: 3 additions & 2 deletions examples/case_studies/BEST.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
}
],
"source": [
"import warnings\n",
"\n",
"import arviz as az\n",
"import matplotlib.pyplot as plt\n",
"import numpy as np\n",
Expand All @@ -36,8 +38,7 @@
"metadata": {},
"outputs": [],
"source": [
"import warnings\n",
"warnings.filterwarnings('ignore')"
"warnings.filterwarnings(\"ignore\")"
]
},
{
Expand Down
2 changes: 2 additions & 0 deletions examples/case_studies/LKJ.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@
"outputs": [],
"source": [
"az.style.use(\"arviz-darkgrid\")\n",
"\n",
"warnings.simplefilter(action=\"ignore\", category=FutureWarning)\n",
"\n",
"RANDOM_SEED = 8924\n",
"np.random.seed(3264602) # from random.org"
]
Expand Down
2 changes: 2 additions & 0 deletions examples/case_studies/factor_analysis.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@
"source": [
"%config InlineBackend.figure_format = 'retina'\n",
"az.style.use(\"arviz-darkgrid\")\n",
"\n",
"warnings.filterwarnings(\"ignore\")\n",
"\n",
"np.set_printoptions(precision=3, suppress=True)\n",
"np.random.seed(314159)"
]
Expand Down
2 changes: 2 additions & 0 deletions examples/case_studies/multilevel_modeling.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,9 @@
"from theano import tensor as tt\n",
"\n",
"print(f\"Running on PyMC3 v{pm.__version__}\")\n",
"\n",
"warnings.simplefilter(action=\"ignore\", category=FutureWarning)\n",
"\n",
"RANDOM_SEED = 8924\n",
"np.random.seed(286)"
]
Expand Down
3 changes: 1 addition & 2 deletions examples/case_studies/putting_workflow.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
],
"source": [
"import io\n",
"import warnings\n",
"\n",
"import arviz as az\n",
"import matplotlib.pyplot as plt\n",
Expand All @@ -33,8 +34,6 @@
"metadata": {},
"outputs": [],
"source": [
"import warnings\n",
"\n",
"warnings.filterwarnings(\"ignore\")"
]
},
Expand Down
2 changes: 1 addition & 1 deletion examples/diagnostics_and_criticism/Bayes_factor.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -694,7 +694,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.6"
"version": "3.8.5"
}
},
"nbformat": 4,
Expand Down
10 changes: 5 additions & 5 deletions examples/gaussian_processes/GP-Latent.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@
},
"outputs": [],
"source": [
"import warnings\n",
"\n",
"import arviz as az\n",
"import matplotlib.pyplot as plt\n",
"import numpy as np\n",
Expand All @@ -129,8 +131,6 @@
"metadata": {},
"outputs": [],
"source": [
"import warnings\n",
"\n",
"# mute future warnings from theano\n",
"warnings.simplefilter(action=\"ignore\", category=FutureWarning)"
]
Expand Down Expand Up @@ -996,9 +996,9 @@
"metadata": {
"anaconda-cloud": {},
"kernelspec": {
"display_name": "Python 3",
"display_name": "Python (PyMC3 Dev)",
"language": "python",
"name": "python3"
"name": "pymc3-dev"
},
"language_info": {
"codemirror_mode": {
Expand All @@ -1010,7 +1010,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.3"
"version": "3.8.5"
}
},
"nbformat": 4,
Expand Down
6 changes: 3 additions & 3 deletions examples/gaussian_processes/GP-MaunaLoa2.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2500,9 +2500,9 @@
"metadata": {
"anaconda-cloud": {},
"kernelspec": {
"display_name": "dev-pymc",
"display_name": "Python (PyMC3 Dev)",
"language": "python",
"name": "dev-pymc"
"name": "pymc3-dev"
},
"language_info": {
"codemirror_mode": {
Expand All @@ -2514,7 +2514,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.11"
"version": "3.8.5"
}
},
"nbformat": 4,
Expand Down
8 changes: 4 additions & 4 deletions examples/gaussian_processes/GP-MeansAndCovs.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2463,9 +2463,9 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"display_name": "Python (PyMC3 Dev)",
"language": "python",
"name": "python3"
"name": "pymc3-dev"
},
"language_info": {
"codemirror_mode": {
Expand All @@ -2477,7 +2477,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.6"
"version": "3.8.5"
},
"papermill": {
"duration": 93.784947,
Expand All @@ -2493,4 +2493,4 @@
},
"nbformat": 4,
"nbformat_minor": 4
}
}
6 changes: 3 additions & 3 deletions examples/gaussian_processes/GP-SparseApprox.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -477,9 +477,9 @@
"metadata": {
"anaconda-cloud": {},
"kernelspec": {
"display_name": "Python 3",
"display_name": "Python (PyMC3 Dev)",
"language": "python",
"name": "python3"
"name": "pymc3-dev"
},
"language_info": {
"codemirror_mode": {
Expand All @@ -491,7 +491,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.7"
"version": "3.8.5"
}
},
"nbformat": 4,
Expand Down
2 changes: 1 addition & 1 deletion examples/gaussian_processes/GP-TProcess.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.2"
"version": "3.8.5"
}
},
"nbformat": 4,
Expand Down
6 changes: 3 additions & 3 deletions examples/gaussian_processes/GP-smoothing.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -585,9 +585,9 @@
"metadata": {
"anaconda-cloud": {},
"kernelspec": {
"display_name": "Python 3",
"display_name": "Python (PyMC3 Dev)",
"language": "python",
"name": "python3"
"name": "pymc3-dev"
},
"language_info": {
"codemirror_mode": {
Expand All @@ -599,7 +599,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.7"
"version": "3.8.5"
},
"latex_envs": {
"bibliofile": "biblio.bib",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
}
],
"source": [
"import warnings\n",
"\n",
"import arviz as az\n",
"import matplotlib.pyplot as plt\n",
"import numpy as np\n",
Expand All @@ -41,8 +43,6 @@
"metadata": {},
"outputs": [],
"source": [
"import warnings\n",
"\n",
"warnings.filterwarnings(\"ignore\")"
]
},
Expand Down
4 changes: 2 additions & 2 deletions examples/generalized_linear_models/GLM-linear.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@
}
],
"source": [
"import warnings\n",
"\n",
"import arviz as az\n",
"import matplotlib.pyplot as plt\n",
"import numpy as np\n",
Expand All @@ -103,8 +105,6 @@
"metadata": {},
"outputs": [],
"source": [
"import warnings\n",
"\n",
"warnings.filterwarnings(\"ignore\")"
]
},
Expand Down
4 changes: 2 additions & 2 deletions examples/generalized_linear_models/GLM-logistic.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
}
],
"source": [
"import warnings\n",
"\n",
"from collections import OrderedDict\n",
"from time import time\n",
"\n",
Expand All @@ -53,8 +55,6 @@
"metadata": {},
"outputs": [],
"source": [
"import warnings\n",
"\n",
"warnings.filterwarnings(\"ignore\")"
]
},
Expand Down
4 changes: 2 additions & 2 deletions examples/generalized_linear_models/GLM-model-selection.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
}
],
"source": [
"import warnings\n",
"\n",
"from collections import OrderedDict\n",
"\n",
"import arviz as az\n",
Expand All @@ -41,8 +43,6 @@
"metadata": {},
"outputs": [],
"source": [
"import warnings\n",
"\n",
"warnings.filterwarnings(\"ignore\")"
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,6 @@
"metadata": {},
"outputs": [],
"source": [
"import warnings\n",
"\n",
"warnings.filterwarnings(\"ignore\")"
]
},
Expand Down
6 changes: 3 additions & 3 deletions examples/mixture_models/gaussian_mixture_model.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@
}
],
"source": [
"pm.traceplot(tr, var_names=[\"p\", \"sd\", \"means\"]);"
"az.plot_trace(tr, var_names=[\"p\", \"sd\", \"means\"]);"
]
},
{
Expand Down Expand Up @@ -259,7 +259,7 @@
],
"source": [
"# take a look at traceplot for some model parameters\n",
"pm.plots.traceplot(tr[::5], var_names=[\"p\", \"sd\", \"means\"]);"
"az.plot_trace(tr[::5], var_names=[\"p\", \"sd\", \"means\"]);"
]
},
{
Expand Down Expand Up @@ -293,7 +293,7 @@
],
"source": [
"# I prefer autocorrelation plots for serious confirmation of MCMC convergence\n",
"pm.autocorrplot(tr[::5], var_names=[\"sd\"]);"
"az.plot_autocorr(tr[::5], var_names=[\"sd\"]);"
]
},
{
Expand Down
16 changes: 0 additions & 16 deletions examples/mixture_models/marginalized_gaussian_mixture_model.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -606,22 +606,6 @@
"%load_ext watermark\n",
"%watermark -n -u -v -iv -w"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"papermill": {
"duration": 0.04472,
"end_time": "2020-12-20T20:58:55.101908",
"exception": false,
"start_time": "2020-12-20T20:58:55.057188",
"status": "completed"
},
"tags": []
},
"outputs": [],
"source": []
}
],
"metadata": {
Expand Down
2 changes: 1 addition & 1 deletion examples/ode_models/ODE_API_shapes_and_benchmarking.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"source": [
"import logging\n",
"\n",
"import arviz\n",
"import matplotlib.pyplot as plt\n",
"import numpy as np\n",
"import pymc3 as pm\n",
Expand All @@ -40,7 +41,6 @@
"# this notebook show DEBUG log messages\n",
"logging.getLogger(\"pymc3\").setLevel(logging.DEBUG)\n",
"\n",
"import arviz\n",
"import IPython.display"
]
},
Expand Down
4 changes: 2 additions & 2 deletions examples/ode_models/ODE_with_manual_gradients.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
"metadata": {},
"outputs": [],
"source": [
"import warnings\n",
"\n",
"import arviz as az\n",
"import matplotlib.pyplot as plt\n",
"import numpy as np\n",
Expand All @@ -24,8 +26,6 @@
"metadata": {},
"outputs": [],
"source": [
"import warnings\n",
"\n",
"warnings.filterwarnings(\"ignore\", category=FutureWarning)"
]
},
Expand Down
2 changes: 1 addition & 1 deletion examples/pymc3_howto/lasso_block_update.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"metadata": {},
"outputs": [],
"source": [
"warnings.filterwarnings(\"ignore\", category=DeprecationWarning)"
"warnings.filterwarnings(\"ignore\")"
]
},
{
Expand Down

0 comments on commit 8593e05

Please sign in to comment.