如下使用pyLDAvis包时,在我的jupyter笔记本中,
pyLDAvis.enable_notebook()
lda_tfidf = LatentDirichletAllocation(n_components=20, random_state=0)
lda_tfidf.fit(dtm_tfidf)
pyLDAvis.sklearn.prepare(lda_tf, dtm_tf, tf_vectorizer)
生成的绘图自动调整我的 jupyter 笔记本的宽度,使所有其他单元格与边界重叠 - 我尝试过:
from IPython.core.display import display, HTML
display(HTML("<style>.container { width:95% !important; }</style>"))
没有运气,以及
# Using gensim[![enter image description here][1]][1]
v = pyLDAvis.gensim.prepare(lda_model, doc_term_matrix, dictionary)
pyLDAvis.display(v)
花一些时间搜索文档......似乎没有任何关于这就是文档的内容,之前有没有人研究过代码并可以指出我正确的方向?
似乎没有任何其他帖子,但检查了版本等......没有运气
重叠的图像如下所示: