Moreau smoothing of a negative log-density (source code)

= Moreau smoothing of a negative log-density
{c}

For a <proper convex function> with <sequential lower semicontinuity> $U=-\log\mu$, form $U_\lambda(x)=\inf_y\{U(y)+\lambda\|x-y\|^2\}$ with $\lambda>0$. The <Moreau envelope> theorem gives $\nabla U_\lambda(x)=2\lambda(x-\operatorname{prox}_{U/(2\lambda)}(x))$. If $e^{-U_\lambda}$ is integrable, it defines a smooth surrogate <probability density function>. Infimizing the <logarithm> of a <probability density function> with a positive quadratic penalty has the opposite sign and does not generally smooth it. For the <Laplace distribution>, that incorrect operation leaves $-\log2-|x|-1/(4\lambda)$, which is not differentiable at zero.