Using tidytext and broom but not finding tidier for LDA_VEM

后端 未结 4 1995
春和景丽
春和景丽 2021-01-22 21:16

The tidytext book has examples with a tidier for topicmodels:

library(tidyverse)
library(tidytext)
library(topicmodels)
library(broom)

year_word_counts <- ti         


        
4条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-01-22 21:44

    Adding to the very helpful answer provided by Julia Silge:

    I too believe that the interaction between loading .Rdata and the topicmodels package is the culprit here. But you can still work with your saved workspace:

    I was able to eliminate the problem by starting with a fresh restart of RStudio, loading the topicmodels package and then loading the .Rdata. Done in this sequence, the error message disappears. Loading first the data and then the package does not work.

    One more word on workspaces: In the case of LDA, using these along with your RScripts is really the only way I could figure out to work efficiently. Depending on the parameters and the size of the corpus, fitting an LDA-model may take several hours. It is crucial to be able to save the model fit to then do further analyses down the road.

提交回复
热议问题