Skip to content

Replacing PyMC3 plots w/ Arviz plots & sigma Param change [Part 7] #19

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
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions examples/samplers/DEMetropolisZ_EfficiencyComparison.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -451,9 +451,7 @@
{
"cell_type": "code",
"execution_count": 5,
"metadata": {
"scrolled": false
},
"metadata": {},
"outputs": [
{
"data": {
Expand Down Expand Up @@ -530,9 +528,7 @@
{
"cell_type": "code",
"execution_count": 6,
"metadata": {
"scrolled": false
},
"metadata": {},
"outputs": [
{
"data": {
Expand Down Expand Up @@ -1373,7 +1369,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.10"
"version": "3.8.5"
},
"widgets": {
"application/vnd.jupyter.widget-state+json": {
Expand Down
13 changes: 2 additions & 11 deletions examples/samplers/DEMetropolisZ_tune_drop_fraction.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,7 @@
{
"cell_type": "code",
"execution_count": 5,
"metadata": {
"scrolled": false
},
"metadata": {},
"outputs": [
{
"name": "stderr",
Expand Down Expand Up @@ -1387,13 +1385,6 @@
"%load_ext watermark\n",
"%watermark -n -u -v -iv -w"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand All @@ -1412,7 +1403,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.10"
"version": "3.8.5"
},
"widgets": {
"application/vnd.jupyter.widget-state+json": {
Expand Down
112 changes: 56 additions & 56 deletions examples/samplers/GLM-hierarchical-jax.ipynb

Large diffs are not rendered by default.

1,273 changes: 58 additions & 1,215 deletions examples/samplers/MLDA_gravity_surveying.ipynb

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion examples/samplers/MLDA_introduction.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.9"
"version": "3.8.5"
}
},
"nbformat": 4,
Expand Down
163 changes: 62 additions & 101 deletions examples/samplers/MLDA_simple_linear_regression.ipynb

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@
}
Copy link
Member

@twiecki twiecki Jan 29, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should probably add the model context to this and below to future proof this and get rid of the annoying warning.


Reply via ReviewNB

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds great. I quite didn't understand what the FutureWarning recommended, but I am happy to update the description as a PR.

Here was my take on what the FutureWarning recommended haha:

with model:
    trace2_az = az.from_pymc3(trace2)
az.summary(trace2_az)

],
"source": [
"pm.stats.summary(trace1)"
"az.summary(trace1)"
]
},
{
Expand Down Expand Up @@ -632,7 +632,7 @@
}
],
"source": [
"pm.stats.summary(trace2)"
"az.summary(trace2)"
]
},
{
Expand Down Expand Up @@ -680,7 +680,7 @@
}
],
"source": [
"pm.plots.traceplot(trace1)"
"az.plot_trace(trace1)"
]
},
{
Expand Down Expand Up @@ -721,7 +721,7 @@
}
],
"source": [
"pm.plots.traceplot(trace2)"
"az.plot_trace(trace2)"
]
},
{
Expand Down Expand Up @@ -1137,7 +1137,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.9"
"version": "3.8.5"
}
},
"nbformat": 4,
Expand Down
10 changes: 5 additions & 5 deletions examples/samplers/SMC-ABC_Lotka-Volterra_example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,8 @@
],
"source": [
"with pm.Model() as example:\n",
" a = pm.Normal(\"a\", mu=0, sd=5)\n",
" b = pm.HalfNormal(\"b\", sd=1)\n",
" a = pm.Normal(\"a\", mu=0, sigma=5)\n",
" b = pm.HalfNormal(\"b\", sigma=1)\n",
" s = pm.Simulator(\"s\", normal_sim, params=(a, b), sum_stat=\"sort\", epsilon=1, observed=data)\n",
"\n",
" trace, sim_data = pm.sample_smc(kernel=\"ABC\", parallel=True, save_sim_data=True)\n",
Expand Down Expand Up @@ -509,9 +509,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 @@ -523,7 +523,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.6"
"version": "3.8.5"
}
},
"nbformat": 4,
Expand Down
2 changes: 1 addition & 1 deletion examples/samplers/SMC2_gaussians.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.6"
"version": "3.8.5"
}
},
"nbformat": 4,
Expand Down