CommencerCommencer gratuitement

Naming three topics

Let's compare two possible topic model solutions and try naming the topics. Let's start with a three topic model named lda_topics2.

Cet exercice fait partie du cours

Introduction to Text Analysis in R

Afficher le cours

Instructions

  • Select the top 15 terms by topic and reorder term.
  • Plot word_probs2, color and facet based on topic.
  • What would you name these three topics?

Exercice interactif pratique

Essayez cet exercice en complétant cet exemple de code.

# Select the top 15 terms by topic and reorder term
word_probs2 <- ___ %>% 
  ___(___) %>% 
  ___(___) %>% 
  ___() %>%
  mutate(term2 = ___)

# Plot word_probs2, color and facet based on topic
ggplot(
  ___, 
  ___(___)
) +
  geom_col(show.legend = FALSE) +
  ___(___, scales = "free") +
  coord_flip()
Modifier et exécuter le code