|
Hi, Normal-Wishart is usually used as the conjugate prior for parameters: (mu, Sigma), of a multivariate Normal distribution. Now I need to draw samples from a Normal-Wishart distribution. I know how to draw samples from a multivariate Normal or Wishart distribution. But I do not know how to draw mu and Sigma simultaneously from a Normal-Wishart distribution. Anyone can help? |
|
First draw the wishart, then the normal. See for the normal-gamma distribution on wikipedia:
Just replace the hyperparameters and you're set. First draw Sigma according to its marginal posterior distribution. Then draw mu according to its posterior distribution conditioned on Sigma. Just as you said, problem solved. Thanks.
(Jun 30 '11 at 06:49)
Tao Zhuang
|
|
In the Machine Learning Summer School 2007, Yee Why Teh had a tutorial on DP processes, and he used a Gaussian with Wishart Priors. He has the code hosted here (Look for MLSS2007) Thanks for your answer. I checked Teh's code. Seems to me it uses the same method as Passos said, in this file: bnpdemo/distributions/@Gaussian/rand.m. Problem solved, thanks.
(Jun 30 '11 at 06:53)
Tao Zhuang
|