From 06fd93d909eb1bba4bfc071ac6cb485202a10e82 Mon Sep 17 00:00:00 2001 From: dsquareindia Date: Thu, 24 Nov 2016 15:30:19 +0530 Subject: [PATCH] Inference added to HdpModel docs --- gensim/models/hdpmodel.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/gensim/models/hdpmodel.py b/gensim/models/hdpmodel.py index 7e19cd3a7f..940295a6c6 100755 --- a/gensim/models/hdpmodel.py +++ b/gensim/models/hdpmodel.py @@ -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. """