pyLDAvis prepare() is slow

Viewed 1414

The code below takes forever to execute. Probably due to the large size of the dictionary. Is there a way to make it faster, by e.g. cropping the visualized data?

vis = pyLDAvis.gensim.prepare(lda, corpus, id2word)
1 Answers

It seems that the default mds algorithm (pcoa) is unstable. Using different algorithm (e.g. mmds) makes if faster:

vis = pyLDAvis.gensim.prepare(lda, corpus, id2word, mds='mmds')
pyLDAvis.show(vis)
Related