Top2Vec
Top2Vec copied to clipboard
How to get the topc size and topic number of reduced model
Could you please tell me how to get the topic size and topic number of the reduced hierarchical model?
have you found the solution?
Could you please tell me how to get the topic size and topic number of the reduced hierarchical model?
Hi did you manage to reduce the number of topics?
` def get_num_topics(self, reduced=False): """ Get number of topics. This is the number of topics Top2Vec has found in the data by default. If reduced is True, the number of reduced topics is returned. Parameters ---------- reduced: bool (Optional, default False) The number of original topics will be returned by default. If True will return the number of reduced topics, if hierarchical topic reduction has been performed. Returns ------- num_topics: int """
if reduced:
self._validate_hierarchical_reduction()
return len(self.topic_vectors_reduced)
else:
return len(self.topic_vectors)`
i think just set reduced=True, and you can get topics after reduced and topic size is in same way. This Module store raw model and raw topics seperately.