[Topic-models] NaN (not a number) problem in Supervised topic model

David Blei blei at CS.Princeton.EDU
Fri May 16 12:13:40 EDT 2008


hi kevin,

typically, asserts don't indicate problems.  they are used to find and  
diagnose them.  if the likelihood ever is NaN then i want the program  
to stop running because there is something seriously wrong.

i'm not sure what your problem might be, but the likelihood should not  
be NaN.

best,
dave


On May 15, 2008, at 11:44 PM, kevin chen 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 it.
>
> Interestingly, there is also a NaN check in Blei's code of LDA:
> assert(!isnan(likelihood));
> So is it a general problem in topic model related program?
>
> Thank you in advance.
>
> Best,
> Kevin
>
> _______________________________________________
> Topic-models mailing list
> Topic-models at lists.cs.princeton.edu
> https://lists.cs.princeton.edu/mailman/listinfo/topic-models
>



More information about the Topic-models mailing list