Discussion:
[gensim:9030] How to use pyldavis to display my lda model
l***@gmail.com
2017-08-07 09:14:45 UTC
Permalink
every time I ran the code,it says that the kernel has died ,restarting.
lda_model=gensim.models.LdaModel(corpus_train,id2word=id2word,num_topics =
10)
my code is below:


import pyLDAvis.gensim
from IPython.display import display
prepared = pyLDAvis.gensim.prepare(goodLdaModel, corpus_train, id2word)
display(pyLDAvis.display(prepared))
--
You received this message because you are subscribed to the Google Groups "gensim" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gensim+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Ivan Menshikh
2017-08-09 06:14:44 UTC
Permalink
Hello,

Perhaps you do not have enough memory, check the logs of notebooks and
track memory consumption.
Post by l***@gmail.com
every time I ran the code,it says that the kernel has died ,restarting.
lda_model=gensim.models.LdaModel(corpus_train,id2word=id2word,num_topics =
10)
import pyLDAvis.gensim
from IPython.display import display
prepared = pyLDAvis.gensim.prepare(goodLdaModel, corpus_train, id2word)
display(pyLDAvis.display(prepared))
--
You received this message because you are subscribed to the Google Groups "gensim" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gensim+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Kenneth Orton
2017-09-19 05:54:57 UTC
Permalink
Try saving as html instead of displaying.


vis_data = gensim_vis.prepare(lda, corpus, dictionary, sort_topics=False)
pyLDAvis.save_html(vis_data, 'name_of_out_file.html')
Post by l***@gmail.com
every time I ran the code,it says that the kernel has died ,restarting.
lda_model=gensim.models.LdaModel(corpus_train,id2word=id2word,num_topics =
10)
import pyLDAvis.gensim
from IPython.display import display
prepared = pyLDAvis.gensim.prepare(goodLdaModel, corpus_train, id2word)
display(pyLDAvis.display(prepared))
--
You received this message because you are subscribed to the Google Groups "gensim" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gensim+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...