diff --git a/post.ipynb b/post.ipynb index cadc30c..9d3e08c 100644 --- a/post.ipynb +++ b/post.ipynb @@ -49,7 +49,7 @@ "strt = time.time()\n", "with simple_model:\n", " simple_trace = pm.sample(\n", - " draws=3000, tune=3000, random_seed=42, return_inferencedata=True\n", + " draws=3000, tune=3000, random_seed=42, chains=2, return_inferencedata=True\n", " )\n", "\n", " # About half the time is spent in tuning so correct for that\n", @@ -116,7 +116,7 @@ "with model:\n", " strt = time.time()\n", " default_trace = pm.sample(\n", - " draws=10000, tune=5000, random_seed=42, return_inferencedata=True\n", + " draws=3000, tune=3000, random_seed=42, chains=2, return_inferencedata=True\n", " )\n", " default_time = 0.5 * (time.time() - strt)\n", "\n", @@ -258,10 +258,19 @@ "source": [ "The computational efficiency of this method is similar to PyMC3's default performance on an isotropic Gaussian (within a factor of a few) and corresponds to an improvement of more than *three orders of magnitude* over the default PyMC3 performance on a correlated Gaussian.\n", "\n", - "While I've found that this procedure can substantially improve the sampling efficiency in many real world scenerios (especially during exploratory phases of a project), you shouldn't forget about reparameterization because that can provide even better performance and help identify problems with your model specification.\n", - "Futhermore, this method might run into numerical issues for high dimensional problems because more samples will be needed to reliably estimate the off-diagonal elements of the mass matrix.\n", - "Either way, hopefully this is helpful to folks until PyMC3 includes native support for this type of procedure." + "While I've found that this procedure can substantially improve the sampling efficiency in many real world scenarios (especially during exploratory phases of a project), you shouldn't forget about reparameterization because that can provide even better performance and help identify problems with your model specification.\n", + "Furthermore, this method might run into numerical issues for high dimensional problems because more samples will be needed to reliably estimate the off-diagonal elements of the mass matrix.\n", + "Either way, hopefully this is helpful to folks until PyMC3 includes native support for this type of procedure.\n", + "\n", + "*Edit: This feature is now available in PyMC3 using the* `init=\"adapt_full\"` *argument to* `pm.sample`." ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] } ], "metadata": {