MaartenGr / MaartenGr/BERTopic
Question on incremental training and a suggestion
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 7.8k
- Forks
- 920
- Avg merge
- 22h 24m
- Merged PRs (30d)
- 5
Description
Hi, Thank you so much for creating such a cool and interactive and highly modular technique in Topic Modeling.
I have a question and a recommendation.
Regarding the question, I'm curious if there are any options for online training while still using HDBSCAN and UMAP. These methods offer powerful concepts for dimensionality reduction and hierarchical density-based clustering, and I would like to retain their benefits. Other methods tend to lack support for noise detection since they don't include a density component. I'm interested in your suggestions for online training that can preserve these outstanding components.
Additionally, I'd like to recommend using the following function to wrap the document text for hovertext:
def insert_newlines(text, every=20):
words = text.split()
lines = [' '.join(words[i:i+every]) for i in range(0, len(words), every)]
return '
'.join(lines)
By applying this function to selection["doc"], the document text can be made more readable with hovertext in document plots.
I've tested the function with every = 20, and it works effectively with documents of any length.
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 reviewing BERTopic's online-training options involving UMAP and HDBSCAN, then inspect the document-plot code where selection["doc"] is used for hovertext. The issue does not name files or tests. Done would require a decided approach for incremental training and clearer hovertext, with project tests or examples updated accordingly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data-visualization, machine-learning
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100