{
"cells": [
{
"cell_type": "markdown",
"id": "e38e2835-cc49-4933-bd05-eced7be0a81e",
"metadata": {},
"source": [
"# Overview of Hamiltonian Monte Carlo"
]
},
{
"cell_type": "markdown",
"id": "d8c8836f-269f-41c5-b575-d693a3da978c",
"metadata": {},
"source": [
"*This portion of the recitation we prepared by Rosita Fu. It is an outline of [Betancourt's paper](https://arxiv.org/pdf/1701.02434.pdf). All figures and notation are from the paper. All lingering inaccuracies are my own.*\n",
"\n",
"This notebook will be presented in parallel with the next notebook by former TA Tom Röeschinger, which demonstrates the notion of a typical set alongside more detailed math/visualization and implementation of Hamiltonian Monte Carlo. "
]
},
{
"cell_type": "markdown",
"id": "148b4243-0ef2-4d60-9697-ce3dccfc2b92",
"metadata": {
"tags": []
},
"source": [
"### *Notation* \n",
"\n",
"$Q$: sample space constructed from parameter set (our priors!)\n",
"\n",
"$\\pi$: target distribution\n",
"\n",
"$\\pi(q)$: target density (this is our posterior!)\n",
"\n",
"$D$: D-dimensional sample space Q\n",
"\n",
"### *Motivating interest:*\n",
"\n",
"Integrals that look like \n",
"$$ \\int_Q \\mathrm{d} q \\hspace{0.1em} \\pi (q) f(q) = \\mathbb{E}_{\\pi}[f]$$\n",
"If there is no analytical approach, we are left with numerical techniques. We essentially want to evaluate integrals by averaging over some representative region of parameter space instead of the entirety of parameter space. The problem is that the ordinary techniques do not handle high-dimensions very well.
\n",
"The expectation symbol is convenient notation, but the important thing to recognize here is that $dq$ is some volume element and $\\pi(q)$ is our density at a given position $q$. \n",
"
\n",
"\n",
"### *Features of a high-dimensional space Q:*\n",
"- There is much more volume outside any given neighborhood than inside of it (consider simple case of partitioning 1D line, 2D box, 3D cube). We are thus interested in the neighborhoods in Q that balance both the denisty and volume in any given integration/expectation. \n",
"- Volume and density end up pulling the mass to two different extremes—the result is that the predominant concentration of mass sits away from either extreme (high density: at the mode, concentrated in small volume blocks, high volume: mostly out in the tails, each \"block\" contributes small density, but there is an overwhelming number of blocks!) \n",
"- This all motivates the definition of a **typical set**, the region of parameter space $Q$ (volume) where most of our probability mass, the integrated quantity $\\pi(q) \\mathrm{d}q$, sits. \n",
"