Implementing a Logistic Normal Distribution<p>Hi all,</p>
<p>I'm trying to implement David Blei's Correlated Topic Model (http://www.cs.princeton.edu/~blei/papers/BleiLafferty2007.pdf), which is basically LDA but with the per-document topic distribution drawn from a Logistic Normal Distribution rather than a Dirichlet.
More specifically, the variable is drawn from a multivariate Gaussian, put through an exponential function and then normalised so that the values sum to one.</p>
<p>Is there an easy way to define such a variable/distribution in Infer.NET? I went as far as defining my own Factor class but then am unsure as to how I should go about implementing its corresponding Operator class :(<br/>
<br/>
Any help is greatly appreciated. </p>
<p>Thanks and regards,<br/>
Josiah </p>© 2009 Microsoft Corporation. All rights reserved.Wed, 14 Sep 2011 21:50:56 Z413df06d-5eea-4ebc-a2ed-c8b75266c571- https://social.microsoft.com/Forums/en-US/413df06d-5eea-4ebc-a2ed-c8b75266c571/implementing-a-logistic-normal-distribution?forum=infer.net#413df06d-5eea-4ebc-a2ed-c8b75266c571https://social.microsoft.com/Forums/en-US/413df06d-5eea-4ebc-a2ed-c8b75266c571/implementing-a-logistic-normal-distribution?forum=infer.net#413df06d-5eea-4ebc-a2ed-c8b75266c571Josiah Wanghttps://social.microsoft.com:443/profile/josiah%20wang/?type=forumImplementing a Logistic Normal Distribution<p>Hi all,</p>
<p>I'm trying to implement David Blei's Correlated Topic Model (http://www.cs.princeton.edu/~blei/papers/BleiLafferty2007.pdf), which is basically LDA but with the per-document topic distribution drawn from a Logistic Normal Distribution rather than a Dirichlet.
More specifically, the variable is drawn from a multivariate Gaussian, put through an exponential function and then normalised so that the values sum to one.</p>
<p>Is there an easy way to define such a variable/distribution in Infer.NET? I went as far as defining my own Factor class but then am unsure as to how I should go about implementing its corresponding Operator class :(<br/>
<br/>
Any help is greatly appreciated. </p>
<p>Thanks and regards,<br/>
Josiah </p>Wed, 14 Sep 2011 01:20:47 Z2011-09-14T01:20:47Z
- https://social.microsoft.com/Forums/en-US/413df06d-5eea-4ebc-a2ed-c8b75266c571/implementing-a-logistic-normal-distribution?forum=infer.net#86dab2c4-8159-4699-92f9-bd538f2ea940https://social.microsoft.com/Forums/en-US/413df06d-5eea-4ebc-a2ed-c8b75266c571/implementing-a-logistic-normal-distribution?forum=infer.net#86dab2c4-8159-4699-92f9-bd538f2ea940Tom Minkahttps://social.microsoft.com:443/profile/tom%20minka/?type=forumImplementing a Logistic Normal DistributionThe <a href="http://community.research.microsoft.com/blogs/infernet_team_blog/archive/2010/11/24/new-features-in-infer-net-2-4-the-softmax-factor.aspx" rel="nofollow">
Softmax factor</a> already does what you want. However, version 2.4 Beta 2 does not provide Softmax of a vector, only Softmax of a double array. You can use ArrayFromVector to convert from a Gaussian vector, but this loses the correlations
(it converts from VectorGaussian to array of Gaussian). The next beta release will have Softmax of a vector.<br/>Wed, 14 Sep 2011 12:28:00 Z2011-09-14T12:29:20Z
- https://social.microsoft.com/Forums/en-US/413df06d-5eea-4ebc-a2ed-c8b75266c571/implementing-a-logistic-normal-distribution?forum=infer.net#83e2a7c4-d778-4795-9930-37d56bd0016ehttps://social.microsoft.com/Forums/en-US/413df06d-5eea-4ebc-a2ed-c8b75266c571/implementing-a-logistic-normal-distribution?forum=infer.net#83e2a7c4-d778-4795-9930-37d56bd0016eJosiah Wanghttps://social.microsoft.com:443/profile/josiah%20wang/?type=forumImplementing a Logistic Normal Distribution<p>Ah... didn't realise that it's there. Perfect! Thanks Tom!</p>
<p>Regards,<br/>
Josiah</p>Wed, 14 Sep 2011 21:50:45 Z2011-09-14T21:50:45Z