Skip to content

Commit

Permalink
rerun workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
panwanke committed Dec 20, 2023
1 parent a6bd4a3 commit 09a842c
Showing 1 changed file with 19 additions and 65 deletions.
84 changes: 19 additions & 65 deletions dockerHDDM_Workflow.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,15 @@
"\n",
"- Wanke Pan ([email protected]) @Nanjing Normal University\n",
"- Hu Chuan-Peng (corresponding author, [email protected]) @Nanjing Normal University\n",
"- Ru-Yuan Zhang (corresponding author, [email protected]) @Shanghai Jiao Tong University\n",
"\n",
"This is a supplementary notebook for the introductary paper *A Hitchhiker’s Guide to Bayesian Hierarchical Drift-Diffusion Modeling with dockerHDDM*. \n",
"\n",
"This notebook was tested in docker image [`hcp4715/hddm:0.9.8-amd64`](https://hub.docker.com/r/hcp4715/hddm/tags), where the packages `hddm` and `kabuki` were rectfied to RC version as below code box.\n",
"This notebook was tested in docker image [`hcp4715/hddm:0.9.8-amd64`](https://hub.docker.com/r/hcp4715/hddm/tags), where the packages `kabuki` were rectfied to RC version as below code box.\n",
"\n",
"Preprint of this manuscript: https://psyarxiv.com/6uzga/\n",
"\n",
"![workflow](./figs/fig4/workflow.png)"
"Github repository at: https://github.com/hcp4715/dockerHDDM"
]
},
{
Expand All @@ -31,7 +32,7 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": 4,
"id": "d5205ced",
"metadata": {
"scrolled": true
Expand All @@ -44,7 +45,7 @@
"The current HDDM version is: 0.9.8RC\n",
"The current kabuki version is: 0.6.5RC3\n",
"The current PyMC version is: 2.3.8\n",
"The current ArviZ version is: 0.14.0\n"
"The current ArviZ version is: 0.15.1\n"
]
}
],
Expand Down Expand Up @@ -75,54 +76,6 @@
"print(\"The current ArviZ version is: \", az.__version__)"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "9f8c78f3-73f1-4965-a3e1-56a36d59877e",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"CPU times: user 2min 1s, sys: 9.51 s, total: 2min 10s\n",
"Wall time: 2min 10s\n"
]
}
],
"source": [
"%%time\n",
"m0_infdata = az.from_netcdf(\"model_fitted/m0.nc\")\n",
"m1_infdata = az.from_netcdf(\"model_fitted/m1.nc\")\n",
"m2_infdata = az.from_netcdf(\"model_fitted/m2.nc\")\n",
"m3_infdata = az.from_netcdf(\"model_fitted/m3.nc\")\n",
"m4_infdata = az.from_netcdf(\"model_fitted/m4.nc\")"
]
},
{
"cell_type": "code",
"execution_count": 8,
"id": "98679226-30c0-427e-b870-bb28c08013f6",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"CPU times: user 8.13 s, sys: 194 ms, total: 8.33 s\n",
"Wall time: 8.55 s\n"
]
}
],
"source": [
"%%time\n",
"m0 = hddm.load(\"model_fitted/m0.hddm\")\n",
"m1 = hddm.load(\"model_fitted/m1.hddm\")\n",
"m2 = hddm.load(\"model_fitted/m2.hddm\")\n",
"m3 = hddm.load(\"model_fitted/m3.hddm\")\n",
"m4 = hddm.load(\"model_fitted/m4.hddm\")"
]
},
{
"cell_type": "markdown",
"id": "03047e29",
Expand Down Expand Up @@ -164407,7 +164360,7 @@
"metadata": {},
"outputs": [],
"source": [
"axes.ravel()[0].figure.savefig(\"figs/fig6a.pdf\")"
"axes.ravel()[0].figure.savefig(\"fig6a.pdf\")"
]
},
{
Expand Down Expand Up @@ -165832,7 +165785,7 @@
{
"cell_type": "code",
"execution_count": 48,
"id": "154e5507",
"id": "d49561a2",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -165849,7 +165802,7 @@
},
{
"cell_type": "markdown",
"id": "656765cc",
"id": "1a38226c",
"metadata": {},
"source": [
"First, let's spend some time generating posterior predictions. Note that we set `n_ppc` is 500 means we generate 500 samples for each draws in each parameters. "
Expand Down Expand Up @@ -165906,7 +165859,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "e2b39874-7d80-452e-af72-2d64dea76a1e",
"id": "04473921",
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -165947,7 +165900,7 @@
"metadata": {},
"outputs": [],
"source": [
"axes.ravel()[0].figure.savefig(\"figs/fig7a1.pdf\")"
"axes.ravel()[0].figure.savefig(\"fig7a1.pdf\")"
]
},
{
Expand Down Expand Up @@ -165994,7 +165947,7 @@
"metadata": {},
"outputs": [],
"source": [
"axes.ravel()[0].figure.savefig(\"figs/fig7a2.pdf\")"
"axes.ravel()[0].figure.savefig(\"fig7a2.pdf\")"
]
},
{
Expand Down Expand Up @@ -166052,12 +166005,13 @@
"metadata": {},
"outputs": [],
"source": [
"axes.ravel()[0].figure.savefig(\"figs/fig7b1.pdf\")"
"axes.ravel()[0].figure.savefig(\"fig7b1.pdf\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "96c97eab",
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -166099,7 +166053,7 @@
"metadata": {},
"outputs": [],
"source": [
"axes.ravel()[0].figure.savefig(\"figs/fig7b2.pdf\")"
"axes.ravel()[0].figure.savefig(\"fig7b2.pdf\")"
]
},
{
Expand All @@ -166126,7 +166080,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "aa606c40",
"id": "b5762ceb",
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -166171,7 +166125,7 @@
"metadata": {},
"outputs": [],
"source": [
"axes.figure.savefig(\"figs/fig8a.pdf\")"
"axes.figure.savefig(\"fig8a.pdf\")"
]
},
{
Expand Down Expand Up @@ -166241,7 +166195,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "c3945a07",
"id": "91498072",
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -166281,7 +166235,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "84965ad3",
"id": "ae13df5b",
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -166315,7 +166269,7 @@
"metadata": {},
"outputs": [],
"source": [
"axes.ravel()[0].figure.savefig(\"figs/fig8b.pdf\")"
"axes.ravel()[0].figure.savefig(\"fig8b.pdf\")"
]
},
{
Expand Down

0 comments on commit 09a842c

Please sign in to comment.