Maximum a Posteriori (MAP) Estimation#
Motivation.
When the cost function in Bayesian estimation is unspecified or assumed to be equal for all estimation errors, the estimation problem reduces to Maximum a Posteriori (MAP) estimation.
In this special case of Bayesian estimation, the cost function is uniform, and the optimal estimator minimizes the expected loss by selecting the parameter value that maximizes the posterior distribution.
To apply the MAP estimator, we assume prior knowledge of the parameter’s probability distribution, represented by the prior probability
MAP Estimator Definition#
The MAP estimate is computed by maximizing the posterior probability density function (PDF)
According to Bayes’ theorem, the posterior PDF is given by:
Since the denominator
Therefore, the MAP estimate simplifies to finding the value of
This simplification makes MAP estimation computationally efficient, as it avoids calculating the often complex denominator
MAP Estimator Formulation#
Conditional Cost
Recall that the conditional cost
where
is the cost of estimating as . is the posterior probability density function of given .
Uniform Cost Function
Recall that the uniform cost function penalizes any estimation error beyond a small threshold
where
Expressing the Average Risk with the Uniform Cost Function
Recall that the average risk
where
Using the uniform cost function in the conditional cost equation, we have
Since
This expression calculates the probability that the estimation error exceeds
We can split the integral into two regions where the estimation error is beyond the acceptable threshold:
Substituting the expression for
Recognizing that the total probability integrates to 1:
We can rewrite the sum of the two integrals as:
Substituting back into the average risk expression, we have:
Note that
The term
represents the probability that the true parameter lies within the acceptable error margin of the estimate .By subtracting this probability from 1, we obtain the probability that the estimation error exceeds the acceptable threshold, which is exactly what the conditional cost measures under the uniform cost function.
The Optimal Estimate
To minimize
Since
, the only way to minimize is by maximizing the integral inside the brackets.This integral measures how concentrated the posterior probability
is around the estimate .
As
Thus, minimizing
Therefore, the optimal estimate
Finding The MAP Estimate#
For small
is maximized when the estimate
Essentially, we want to choose
In the case of a unimodal posterior density—that is, a distribution with a single peak—the estimate
Note that the mode of a probability distribution is the value at which the PDF reaches its maximum—the point where the distribution has its peak.
Differential Equation
We have that, in calculus, the maxima (and minima) of a differentiable function occur at critical points where the first derivative is zero.
This is because the slope of the tangent to the function at these points is horizontal, indicating a potential maximum or minimum.
Therefore, in our MAP estimation,
To find the maximum of the posterior density
, we look for the point where the function attains its highest value with respect to .Setting the derivative to zero helps us locate critical points of
, i.e.:
For a unimodal distribution, this critical point corresponds to the global maximum.
By solving
, we find the value of where is at its peak, which is the most probable estimate given the observed data .
Using
We have that:
The logarithm simplifies the optimization problem, especially when the posterior density involves exponential functions or products of multiple terms.
The logarithm turns products into sums and exponents into multipliers, making differentiation more straightforward.
In our case, since the natural logarithm is a strictly increasing function, the location of the maximum of
Therefore, we often obtain a simpler equation to solve for
This approach is particularly useful when
Note that these equations assume that the derivatives exist and that
Example C3.9: MAP Estimation of The True Mean#
Problem Statement
Using Example C3.7, show that the a posteriori PDF of Eq. (C3.98) has a maximum when
Also show that the a posteriori PDF
Solution
To find the MAP estimate
This posterior PDF is a normal distribution with mean
We have that the normal distribution is unimodal and symmetric, the maximum of
Note that, in this example, we do not need to solve the differential equation (i.e., set the derivative of the posterior density to zero) to find the MAP estimate, sepcifically:
Because we know the maximum occurs at the mean for a normal distribution, we can directly identify the MAP estimate without further calculations.
There’s no need to set the derivative
or because we already know where the maximum lies.
Therefore, the MAP estimate
Here we present breifly again the derivation of
Calculating
Recall that the parameters
To simplify, combine the terms in the denominator:
And
And
Multiply
Next, multiply the numerators and denominators:
Simplify the terms inside the parentheses:
Substitute back:
The
Thus, the MAP estimate is the same as the MMSE estimate obtained in previous section.