Gist da5f7a5f8cf01b0874d92349b33ec806
✓ Published0🌍 Public
AArizonaTay
Last edited Dec 29, 2021
Created on Dec 29, 2021
This visualization uses a Latent Dirichlet Allocation (LDA) topic model to classify Instagram captions into eight thematic categories, such as Giveaway, Fitness, and Love. It first shows the derived topics with their top ten keywords per topic, then assigns each caption its dominant topic and displays a random sample of the resulting annotations. The analysis relies on the Gensim library for the LDA model and coherence scoring, while Pandas DataFrames and the Dictionary and doc2bow APIs handle text preprocessing and corpus construction. A custom function maps each caption’s topic distribution to its most likely label, and the final output presents a sample of the enriched data with the assigned topic column.
AI-generated description