[Topic-models] Sampling alpha value in Indian Buffet Process

Rahul Mehta mehta5 at uic.edu
Wed May 24 21:30:34 EDT 2017

Hi all,

I am trying to understand how people have implemented sampling the alpha
value in IBF.  I looked at Finale Doshi-Velez, which is the following
implementation in Matlab:

alpha = random( 'gam' , ...
            param_set.alpha_hyper_a + sum(sum( Zs{ i - 1 } )) , ...
            1/( param_set.alpha_hyper_b + N ));

And the python version:
postShape = self.alpha_a + self.m.sum()
        postScale = float(1) / (self.alpha_b + self.N)
        self.alpha = SPST.gamma.rvs(postShape,scale=postScale)

I know you are sampling from the posterior, but how did they get these
specific values.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cs.princeton.edu/pipermail/topic-models/attachments/20170524/072e7ff0/attachment.html>

More information about the Topic-models mailing list