Skip to content

Commit

Permalink
Fix #2036 (#2115)
Browse files Browse the repository at this point in the history
  • Loading branch information
RTChou authored Aug 7, 2024
1 parent 2353f4c commit a095e58
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bertopic/_bertopic.py
Original file line number Diff line number Diff line change
Expand Up @@ -3955,7 +3955,7 @@ def _guided_topic_modeling(self, embeddings: np.ndarray) -> Tuple[List[int], np.
# embedding of the seeded topic to force the documents in a cluster
for seed_topic in range(len(seed_topic_list)):
indices = [index for index, topic in enumerate(y) if topic == seed_topic]
embeddings[indices] = np.average([embeddings[indices], seed_topic_embeddings[seed_topic]], weights=[3, 1])
embeddings[indices] = embeddings[indices] * 0.75 + seed_topic_embeddings[seed_topic] * 0.25
logger.info("Guided - Completed \u2713")
return y, embeddings

Expand Down

0 comments on commit a095e58

Please sign in to comment.