MaartenGr / MaartenGr/BERTopic
Clusters changed for assigned text after reducing outliers
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 7.8k
- Forks
- 920
- Avg merge
- 22h 24m
- Merged PRs (30d)
- 5
Description
Hi,
I was calling
topic_model = BERTopic()
topics, probs = topic_model.fit_transform(docs)
new_topics = topic_model.reduce_outliers(docs, topics)
to reduce outliers according this page. But I found some of the assigned clusters (before reducing outliers) of the text are changed to a different cluster after reducing outliers.
Shouldn't the already assigned clusters will not change after reducing outliers according to "You can pass outlier and non-outlier documents together since it will only try to reduce outlier documents and label them to a non-outlier topic."?
Is this an expected phenomenon due to that I misunderstand anywhere or there is something wrong inside it?
Thank you for helping me out!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the reported sequence using BERTopic.fit_transform followed by reduce_outliers(docs, topics), then compare the original and returned topic assignments for non-outlier documents. Read the reduce_outliers behavior and the referenced documentation first; done means determining whether non-outlier labels change and providing a focused explanation or reproducible discrepancy for maintainers.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100