inpho / vsm

Vector Space Model Framework developed for InPhO
http://inpho.github.io/vsm
Other
36 stars 14 forks source link

`aggregate_doc_topics` has un-intuitive UI #155

Open JaimieMurdock opened 7 years ago

JaimieMurdock commented 7 years ago

Almost everytime I use aggregate_doc_topics I have to perform the following transformation to get an array of the topic distribution:

# v.aggregate_doc_topics returns an ndarray instead of just values.
theta = v.aggregate_doc_topics(all_ids)
theta = theta[np.argsort(theta['i'])]
theta = np.array(theta['value'])

I should add an aggregate_doc_topic_matrix to return this properly formatted list, or clean up our DataTable implementation. Since the second seems super hard, I'm going to go with the first.