Aan de slagGa gratis aan de slag

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.

Deze oefening maakt deel uit van de cursus

Analyzing Social Media Data in R

Cursus bekijken

Praktische interactieve oefening

Probeer deze oefening eens door deze voorbeeldcode in te vullen.

# Create a topic model with 5 topics
topicmodl_5 <- ___(dtm_climate_new, k = ___)

# Select and view the top 10 terms in the topic model
top_10terms <- ___(topicmodl_5, ___)
top_10terms 
Code bewerken en uitvoeren