1. Learn
  2. /
  3. Courses
  4. /
  5. Analyzing Social Media Data in R

Connected

Exercise

Create a topic model

Topic modeling is the task of automatically discovering topics from a vast amount of text.

You can create topic models from the tweet text to quickly summarize the vast information available into distinct topics and gain insights.

In this exercise, you will extract distinct topics from tweets on "Climate change".

The DTM of tweets on "Climate change" has been pre-loaded as dtm_climate_new.

The library topicmodels has been pre-loaded for this exercise.

Instructions 1/2

undefined XP
  • 1
    • Create a topic model with 5 topics from the DTM using Latent Dirichlet Allocation (LDA).
    • Select and view the top 10 terms in the topic model.
  • 2
    • This time, create a topic model with four topics from the DTM, using LDA again.
    • Select and view the top six terms in this new topic model.