0

需要有关要在 pyLDAvis 中显示的主要组件的帮助。它默认显示 PC1 和 PC2,但是我也有兴趣探索其他组件。

我参考了此文档,但指定的选项plot_opts={'xlab': 'PC1', 'ylab': 'PC2'}仅更改绘图标签。

我正在通过 gensim 使用 pyLDAvis:

pyLDAvis.enable_notebook()
vis = pyLDAvis.gensim.prepare(lda_model, corpus, id2word)
4

1 回答 1

0

您不能更改此库中的尺寸。但是,您可以自己进行多维缩放。在这个包中,他们使用“通过 Jensen-Shannon Divergence & Principal Coordinate Analysis(又名经典多维缩放)进行降维”。只需复制此方法并将尺寸设置为您想要的更多数量。

你可以用 scikit-learn 做到这一点:https ://scikit-learn.org/stable/auto_examples/manifold/plot_mds.html

于 2020-08-10T19:40:30.337 回答