Skip to content

Commit

Permalink
Bug fix for get_top_docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanjgallagher committed Jan 14, 2018
1 parent 202cf22 commit 74c40f1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions corex_topic.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ def initialize_parameters(self, X, words, docs):
row_index2doc = {index:doc for index,doc in enumerate(docs)}
self.row_index2doc = row_index2doc
else:
self.row_index2doc = Nones
self.row_index2doc = None

def update_word_parameters(self, X, words):
"""
Expand Down Expand Up @@ -571,7 +571,7 @@ def get_top_docs(self, n_docs=10, topic=None, sort_by='log_prob', print_docs=Tru
provided to CorEx, then each doc will be an integer row index of X
topic_n : integer specifying which topic to get (0-indexed)
sort_by: 'prob' or 'tc', use either 'log_p_y_given_x' or 'log_z' respectively
sort_by: 'log_prob' or 'tc', use either 'log_p_y_given_x' or 'log_z' respectively
to return top docs per each topic
print_docs : boolean, get_top_docs will attempt to print topics using
provided row labels (through 'docs') if possible. Otherwise,
Expand Down

0 comments on commit 74c40f1

Please sign in to comment.