Skip to main content
100%

Bi-term Topic Model implementation in pure Python

✓ Published0🌍 Public
Aabehmiel
Last edited May 2, 2017
Created on Mar 5, 2018

This visualization demonstrates the Bi-Term Topic Model (BTM) in action, showing how topic distributions emerge from short-text co-occurrence patterns. The code implements a pure Python Gibbs sampler that infers latent topics from observed biterms, with the model's parameters visualized as topic-term probability matrices. It uses the `BTMGibbsSampler` class to iteratively update topic assignments via multinomial sampling, relying on the `random` module for stochastic draws and custom normalization functions. The rendering shows the inferred `BTModel`'s topic proportions and per-topic word distributions, highlighting how BTM handles sparse short-text data through biterm aggregation.

AI-generated description

Similar vizzes