Repository navigation
Replies: 2 comments 1 reply
|
There are a number of functions that you can use for extracting the name of the topic. First, you can use |
0 replies
|
Thank you for your answer. Sorry, maybe my question was not clear enough. Greetings, |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hi,
I didn't find a way to extract the topic name after customzing it.
topic_model.set_topic_labels({0: "Healthcare", 1: "Politics", 2:"Economy"})
topic_model.custom_labels_
Weather I'm dealing with train or test data.
For train this is basically the dedicated method: topic_model.topics_[:]
For test this should be the approach:
test_data = pd.DataFrame({'Sentences': ['The cat in the hat.', 'The dog on the log.', 'The fox in the box.']})
topics, probabilities = topic_model.transform(test_data["Sentences"],)
topics
Am I missing something?
Thanks & BR
Aymen
All reactions