MaartenGr / MaartenGr/BERTopic
Hyperparameter Tuning
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 7.8k
- Forks
- 920
- Avg merge
- 22h 24m
- Merged PRs (30d)
- 5
Description
Hello, I am preparing a research paper, and I've come across a somewhat tricky issue.
During hyperparameter optimization, I've identified four hyperparameters: min_topic_size, nr_topics, min_cluster_size, and min_samples, all of which potentially influence the determination of the number of topics. I'm wondering if these four hyperparameters have any priorities, meaning that if one is set at a certain value, the others will be ignored.
If my understanding is correct, it seems that HDBSCAN runs first, and topics are generated within each cluster. If so, what role does min_topic_size play? Is it used to filter out topics if the number of documents within a cluster is insufficient?
Another issue I'm encountering is related to outliers. Is there any way to handle or avoid outliers? It appears that outliers are not clustered. Consequently, in hyperparameter optimization, comparing BERTopic with other methods might not be fair as the number of documents could vary significantly due to the presence of outliers.
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
The issue names min_topic_size, nr_topics, min_cluster_size, and min_samples, but no files, tests, or entry points. First establish how these parameters interact and how outliers are handled; done would require a decided explanation or documented behavior addressing the questions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- machine-learning
- Issue type
- Documentation
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 18/100