Skip to content

Commit

Permalink
DOC: Add intermediate step to show definition of KL divergence.
Browse files Browse the repository at this point in the history
  • Loading branch information
Leengit committed Jun 11, 2021
1 parent 40e88a4 commit cd2df72
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@
"\u0026\\defeq -\\log \\int \\textrm{d}\\theta\\, r(\\theta) \\prod_i^n p(y_i|x_i,\\theta, \\omega) \u0026\u0026 \\text{(Really hard integral)} \\\\\n",
"\u0026= -\\log \\int \\textrm{d}\\theta\\, q(\\theta) \\frac{1}{q(\\theta)} r(\\theta) \\prod_i^n p(y_i|x_i,\\theta, \\omega) \u0026\u0026 \\text{(Multiply by 1)}\\\\\n",
"\u0026\\le - \\int \\textrm{d}\\theta\\, q(\\theta) \\log \\frac{r(\\theta) \\prod_i^n p(y_i|x_i,\\theta, \\omega)}{q(\\theta)} \u0026\u0026 \\text{(Jensen's inequality)}\\\\\n",
"\u0026= - \\int \\textrm{d}\\theta\\, q(\\theta) \\sum_i^n \\log p(y_i|x_i,\\theta, \\omega) + \\int \\textrm{d}\\theta\\, q(\\theta) \\log \\frac{q(\\theta)}{r(\\theta)} \u0026\u0026 \\\\\n",
"\u0026\\defeq \\E_{q(\\Theta)}[ -\\sum_i^n \\log p(y_i|x_i,\\Theta, \\omega) ] + \\K[q(\\Theta), r(\\Theta)]\\\\\n",
"\u0026\\defeq ``\\text{expected negative log likelihood\"} + ``\\text{kl regularizer\"}\n",
"\\end{align*}\n",
Expand Down

0 comments on commit cd2df72

Please sign in to comment.