MaartenGr / MaartenGr/BERTopic

Bertopic cluster question

Open
#1,607 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
7.8k
Forks
920
Avg merge
22h 24m
Merged PRs (30d)
5

Description

Hello,

I'm using BERTtopic for topic modelling and sometimes I find that it clusters topics more broadly than I'd like.

Question 1:Is there a general approach or parameter I can tweak to control the granularity of the topic clustering?

For instance, if I have two sentences: "I like to eat apples" and "I like to eat bananas", I'd prefer them to be classified into two distinct topics given my emphasis on the specific food being liked. Currently, they might be grouped into one topic. How can I adjust the model or the algorithm to achieve this desired granularity in topic classification?

Question2: I found sometimes for the topic -1, outliter there is too many sentence. Is there any way to reduce the noise? Actually I feel some noise actually is misclassify as noise
Thank you!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by investigating how BERTopic controls topic granularity and how it assigns documents to topic -1. Determine whether the requested behavior is supported by existing parameters or would require a broader algorithmic change; the work is complete only when both questions have a documented, reproducible resolution.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.