MaartenGr / MaartenGr/BERTopic
'Merge_Models' with new topic_model from outliers
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 7.8k
- Forks
- 920
- Avg merge
- 22h 24m
- Merged PRs (30d)
- 5
Description
I would like to utilize 'Merge_Models' in BERTopic to re-cluster the outliers with HDBScan and merge them with the existing topics.
However, there are currently some challenges with the Merge_Models functionality:
1. When merging the Topic_model (including all data, with outliers) and the Out_Topic_model (consisting only of outliers), the 'Count' of the Topic_model for -1 increases by the number of outliers, instead of effectively concat them.
2. The Representative_docs are displayed as NaN.
=> [](https://github.com/MaartenGr/BERTopic/discussions/1972#discussion-6618537) is the only way?
My BERTopic Version is 0.16.3
How can these issues be resolved?
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
Start by reproducing the Merge_Models flow described with a Topic_model containing outliers and an Out_Topic_model containing only outliers, using BERTopic 0.16.3 and HDBScan. Check how the merged -1 count and representative_docs are produced. Done means the outlier count is combined correctly and representative documents are no longer NaN.
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
- Mostly clear
- Newbie friendliness
- 35/100