Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting probabilities for all topics given a document from loaded model #1966

Open
rayenFathallah opened this issue May 2, 2024 · 1 comment

Comments

@rayenFathallah
Copy link

I extracted my model using safetensors. In the original model I used cacluate_probabilities = True. When I loaded the model I wanted to predict the topics and the probabilities for a topic using the transform method.
The returned tuple was just the topic and the probability. Is there a way I can extract the probabilities for all the topics ? My goal is to get the top 10 topics for a document.

@MaartenGr
Copy link
Owner

It should have given you the probabilities if you loaded and saved with safetensors. Could you share your full code along with the version of BERTopic you used?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants