Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inference added to HdpModel docs #1029

Merged
merged 1 commit into from
Nov 24, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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