Laplace's Method Exercise Solution (Mackay, 2003)
In this blog, I share my solutions on Mackay 2003 exercises chapter 27 page 342. Disclaimer: I don’t guarantee the validity of each answer. All of the answers are based on my own. However, I am also open for corrections. If you spot any flaws, feel free to contact me via email: arijonamarshal@gmail.com or marshal.arijona01@ui.ac.id. All of the notations follow the text book. For further details, please refer to https://www.inference.org.uk/itprnn/book.pdf.
Problem 1
A photon counter is pointed
at a remote star for one minute, in order to infer the rate of photons arriving at the counter per minute,
and assuming the improper prior P(λ) = 1/λ, make Laplace approximations to the posterior distribution
(a) over
(b) over
Problem 1a
First, let us compute the unnormalized posterior distribution
Recall that we need the mode of distribution in order to perform Laplace approximation. We can compute the mode of
we can find MAP by deriving
Now we can obtain the second order derivative
We are ready to construct our approximate distribution. First, let’s construct the unnnormalized approximation
Our normalization factor
Therefore, we obtain
Problem 1b
From the description,
Observe that our unnormalized transformed posterior is just the transforming likelihood since our transformed prior is just a constant. Now, taking the log of
Now, let’s derive
We then derive our second derivative
We are ready to construct our approximate distribution. First, let’s construct the unnnormalized approximation
Our normalization factor
Therefore, we obtain
Problem 2
Use Laplace’s method to approximate the integral
where
Answer:
Let us define
Now, we aim to evaluate
The normalizing constant can be approximated by:
It’s time for evaluation !! for
with the error:
For the error measurement, we use base 2 logarithm. In other cases we use natural number.
while for
with the error:
Problem 3
Linear regression.
Assuming Gaussian priors on
Answer :
Suppose that
Suppose that we have
Having prior and likelihood. We are ready to compute the log of unnormalized posterior. We only need to apply the Bayes theorem to do so.
Let’s define the unnormalized posterior as
Next step is to obtain the Hessian matrix
Now, we can approximate
Subsequently, we obtain the normalization factor
with
Given a new data point
However, compute this integral is often intractable. We can utilize Monte Carlo estimation to simplify the computation.
with M is the number of samples