{"version":"1.0","type":"rich","title":"Bi-term Topic Model implementation in pure Python","description":"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.","provider_name":"VizHub AI Studio","provider_url":"https://next.vizhub.com","html":"<iframe src=\"https://next.vizhub.com/viz/gist-0467ac791994b7bc8d809b5b52cb7559?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"1\"></iframe>","width":960,"height":500,"cache_age":3600}