Question on MAP
posterior approximator
#77
-
Hi! I trained a MAP posterior approximator and was looking at predictive samples:
And I observed that each time I call this I get different answers. Where is the randomness coming from if a MAP approximation only sees the parameters Thanks in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Hi Paul, you are sampling target variables As you correctly said, there is no randomness in sampling from the MAP approximation of the posterior, since you always get the sample parameters I hope this explains it. Please let me know if it is clear. |
Beta Was this translation helpful? Give feedback.
Hi Paul, you are sampling target variables$y^{(i)}$ from the predictive distribution $p(y|x, D)$ , where $x$ is a certain input for which you want to get target samples, and $D$ is your training data. In order to sample from the predictive distribution, you can actually sample from the joint distribution $p(y, \theta|x, D) = p(y|\theta, x)p(\theta|D)$ , where $\theta$ are model parameters. This means that, in order to obtain a sample $y^{(i)}$ given $x$ and $D$ , you can first sample $\theta^{(j)}$ from the posterior $p(\theta|D)$ , then sample $y^{i}$ from the likelihood $p(y|\theta^{(j)}, x)$ .
As you correctly said, there is no randomness in sampling from the MAP approximation of the poste…