[Topic-models] NaN (not a number) problem in Supervised topic model
mr.chongwang at gmail.com
Fri May 16 11:41:17 EDT 2008
it might a bug of numerical computing: such as log(0) and exp(a huge value).
If it is not a bug of the program, the input value should be checked for
log(x), when x can be zero. for e.g. if (x>0) return log(x); else return
On Thu, May 15, 2008 at 11:44 PM, kevin chen <kchsjtu at yahoo.com> wrote:
> Dear all,
> I am implementing "Supervised topic model" in Matlab language, following
> the paper by Blei and McAuliffe.
> I encounter a problem: after about 30 iterations of EM (corpus level), the
> per-document log-likelihood becomes NaN (Not a number).
> In my code, the vbem (document level) iterates for 200 times without
> convergence analysis. Is NaN problem due to too many vbem iteration times?
> I have checked my code for several times, and couldn't find out how to fix
> Interestingly, there is also a NaN check in Blei's code of LDA:
> So is it a general problem in topic model related program?
> Thank you in advance.
> Topic-models mailing list
> Topic-models at lists.cs.princeton.edu
chongw at cs.princeton.edu
Computer Science Department
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Topic-models