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
.
This exercise is part of the course
Introduction to Text Analysis in R
Exercise 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?
Hands-on interactive exercise
Have a go at this exercise by completing this sample 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()