Skip to content

Commit

Permalink
fixing n_eff syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
dfm committed Jun 6, 2022
1 parent 26bc1e8 commit b6c77da
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions post.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,12 @@
"outputs": [],
"source": [
"import time\n",
"import warnings\n",
"import pymc3 as pm\n",
"import arviz as az\n",
"\n",
"warnings.filterwarnings(\"ignore\")\n",
"\n",
"print(\"PyMC3 version {0}\".format(pm.__version__))\n",
"\n",
"ndim = 5\n",
Expand All @@ -53,7 +56,7 @@
" simple_time = 0.5 * (time.time() - strt)\n",
"\n",
"stats = az.summary(simple_trace)\n",
"simple_time_per_eff = simple_time / stats.n_eff.min()\n",
"simple_time_per_eff = simple_time / stats.ess_bulk.values.min()\n",
"print(\"time per effective sample: {0:.5f} ms\".format(simple_time_per_eff * 1000))"
]
},
Expand Down Expand Up @@ -118,7 +121,7 @@
" default_time = 0.5 * (time.time() - strt)\n",
"\n",
"stats = az.summary(default_trace)\n",
"default_time_per_eff = default_time / stats.n_eff.min()\n",
"default_time_per_eff = default_time / stats.ess_bulk.values.min()\n",
"print(\"time per effective sample: {0:.5f} ms\".format(default_time_per_eff * 1000))"
]
},
Expand Down Expand Up @@ -245,7 +248,7 @@
" dense_time = factor * (time.time() - strt)\n",
"\n",
"stats = az.summary(dense_trace)\n",
"dense_time_per_eff = dense_time / stats.n_eff.min()\n",
"dense_time_per_eff = dense_time / stats.ess_bulk.values.min()\n",
"print(\"time per effective sample: {0:.5f} ms\".format(dense_time_per_eff * 1000))"
]
},
Expand All @@ -262,8 +265,11 @@
}
],
"metadata": {
"interpreter": {
"hash": "d8f5e6b874eb995d9325c7bfdfb796f807dd9e9fb3bde7448cbe7c3e6cab02f9"
},
"kernelspec": {
"display_name": "Python 3",
"display_name": "Python 3.9.13 ('env': venv)",
"language": "python",
"name": "python3"
},
Expand All @@ -277,7 +283,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.1"
"version": "3.9.13"
}
},
"nbformat": 4,
Expand Down

0 comments on commit b6c77da

Please sign in to comment.