IniziaInizia gratis

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.

Questo esercizio fa parte del corso

Introduction to Text Analysis in R

Visualizza il corso

Istruzioni dell'esercizio

  • 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?

Esercizio pratico interattivo

Prova a risolvere questo esercizio completando il codice di esempio.

# 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()
Modifica ed esegui il codice