Skip to content

Commit

Permalink
Bugfix in show_topics()
Browse files Browse the repository at this point in the history
  • Loading branch information
severinsimmler committed Oct 25, 2017
1 parent 520173d commit a923014
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dariah_topics/postprocessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ def show_topics(model=None, vocabulary=None, topic_keys_file=None, num_keys=10):
elif isinstance(model, LdaModel) or isinstance(model, LdaMulticore):
return _show_gensim_topics(model, num_keys)
elif topic_keys_file is not None:
return _show_mallet_topics(topic_keys_file, num_keys)
return _show_mallet_topics(topic_keys_file)


def show_word_weights(word_weights_file, num_tokens):
Expand Down Expand Up @@ -450,7 +450,7 @@ def _show_lda_document_topics(model, document_labels, index):
>>> isinstance(_show_lda_document_topics(model, document_labels, index), pd.DataFrame)
True
"""
return pd.DataFrame(model.doc_topic_, index=index, columns=document_labels).T
return pd.DataFrame(model.doc_topic_, index=document_labels, columns=index).T


def _show_lda_topics(model, vocabulary, num_keys):
Expand Down

0 comments on commit a923014

Please sign in to comment.