Skip to content

Commit

Permalink
better nuts
Browse files Browse the repository at this point in the history
  • Loading branch information
dfm committed Apr 5, 2018
1 parent 704cc47 commit 98cfc6f
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 35 deletions.
49 changes: 16 additions & 33 deletions solutions.ipynb

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions worksheet.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@
" log_prob,\n",
" [m_tensor, b_tensor, log_s_tensor],\n",
" 3500, # The number of MCMC steps\n",
" 0.1, # The integration step size\n",
" 1.0, # The integration step size\n",
" metric=metric # The scaling metric computed above\n",
" )\n",
"nuts_time = time.time() - nuts_time"
Expand Down Expand Up @@ -457,7 +457,8 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"In this case, the NUTS sampler is actually less efficient (i.e. it requires more computation time per independent sample) than emcee (and we're not even considering the cost of tuning here), but this result will quickly be reversed for models with more parameters.\n",
"If everything went as planned, you should see that the NUTS sampler is substantially more efficient (i.e. it requires less computation time per independent sample) than emcee (but we're not considering the cost of tuning here).\n",
"This disparity will tend to increase for \n",
"In general, sampling a density with tens of parameters using emcee will require substantially more patience and computation power than sampling the same problem with NUTS. "
]
},
Expand Down

0 comments on commit 98cfc6f

Please sign in to comment.