Skip to content

Commit

Permalink
HdpModel doc improvement. Inference and print_topics (#1029)
Browse files Browse the repository at this point in the history
  • Loading branch information
devashishd12 authored and tmylk committed Nov 24, 2016
1 parent 14f12f4 commit c2d8187
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion gensim/models/hdpmodel.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,17 @@ class HdpModel(interfaces.TransformationABC, basemodel.BaseTopicModel):
on a training corpus:
>>> hdp = HdpModel(corpus, id2word)
>>> hdp.print_topics(show_topics=20, num_words=10)
You can infer topic distributions on new, unseen documents with
>>> doc_hdp = hdp[doc_bow]
Inference on new documents is based on the approximately LDA-equivalent topics.
To print 20 topics with top 10 most probable words
>>> hdp.print_topics(show_topics=20, num_words=10)
Model persistency is achieved through its `load`/`save` methods.
"""
Expand Down

0 comments on commit c2d8187

Please sign in to comment.