I know it's quite basic, but I want to know if any of you has a good tutorial where they approach Gibbs sampling by sampling from the parameter distribution of a linear regression using Normal Distributions.

I know Gibbs sampling is less efficient that direct inference (which is super easy and has a closed form)

I just want to write some code on that to get a better grasp on sampling techniques

Thanks

asked Jun 21 '11 at 07:01

Leon%20Palafox's gravatar image

Leon Palafox ♦
40857194128

Does it have to be a Gibbs sampler? Metropolis algorithms seem to make more sense in this case because all weights would have to be sampled separately otherwise, if I'm not mistaken.

Edit: Apparently Gibbs sampling is not that as inefficient as I thought: www.biostat.umn.edu/~sudiptob/ph8472/BayesianLinearModel.pdf

(Jun 21 '11 at 07:30) Philemon Brakel

It was more like a toy problem, I want to analyze what's really happening inside the sampler. So I used something easy

(Jun 21 '11 at 08:28) Leon Palafox ♦

You could also implement a metropolis sampler to sample from a two dimensional Gaussian so you can plot things and visually inspect the algorithm. Not much work and sort of fun to watch and play with, in my opinion.

(Jun 21 '11 at 11:24) Philemon Brakel
Be the first one to answer this question!
toggle preview

powered by OSQA

User submitted content is under Creative Commons: Attribution - Share Alike; Other things copyright (C) 2010, MetaOptimize LLC.