给定一个文档术语矩阵dtm,text2vec提供与LDAvis包的良好集成。但是,我想将此可视化嵌入到降价文档中。该LDAvis包具有诸如 之类的方法createJSON,这将允许我执行此操作,但这些都隐藏在 textvec 中的私有方法中。
n_topics = 6
lda = LDA$new(n_topics = 6L, doc_topic_prior = 50 / n_topics, topic_word_prior = 1 / n_topics)
doc_topic_distr = lda$fit_transform(dtm, n_iter = 1000, convergence_tol = 1e-3, n_check_convergence = 10, progressbar = interactive())
无论如何要回到可视化的 json,或者以其他方式访问私有方法text2vec::LDA$new?