cpsievert / LDAvis

R package for web-based interactive topic model visualization.
Other
557 stars 131 forks source link

Missing bar widths when estimated frequency is less than 1 #33

Closed cpsievert closed 9 years ago

cpsievert commented 9 years ago

I noticed this while playing around with my xkcd post. When I choose a very small value of lambda, the term rankings look odd:

screen shot 2015-04-16 at 10 06 35 am

I also see these error messages:

screen shot 2015-04-16 at 10 09 08 am

Consider the term "bruce". Here is the data that createJSON() sends to the browser:

     Term logprob loglift      Freq Total Category
631 bruce -6.5192   3.338 0.8203917     2  Topic22

Note the estimated term frequency (within topic 22) is less than one. However, in ldavis.js, we set the lower bound of the domain to be 1. It should really be 0.