[Topic-models] Troubleshooting Johnathan Chang's R-LDA Package
sgrao at purdue.edu
Tue Jan 4 16:32:35 EST 2011
I found this strange error in R-lda package, while doing query inference.
For a given LDAmodel (on the corpus), dicitonary of words = myDict, I
extract the following
topics <- LDAmodel$topics * 1000000
storage.mode(topics) <-"integer" # done to ensure that the matrix is an
topic_sums <- LDAmodel$topicsums *1000000
storage.mode(topic_sums) <-"integer" # done to ensure that the matrix is an
then run the LD model, for the queries docs_test
= list(topics = topics,topic_sums = topic_sums))
I get the following error
Error in structure(.Call("collapsedGibbsSampler", documents, as.integer(K),
Counts became negative for word (241): (4, -2147482775, 2)
n storage.mode(topics) <- "integer" : NAs introduced by coercion
Any clue as to why this is happening?
School of Electrical and Computer Engineering
West Lafayette IN
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Topic-models