Create an LDATS LDA summary plot, with a top panel showing
the topic proportions for each word and a bottom panel showing the topic
proportions of each document/over time. The plot function is defined for
class LDA_VEM specifically (see LDA).
LDA_plot_top_panel creates an LDATS LDA summary plot
top panel showing the topic proportions word-by-word.
LDA_plot_bottom_panel creates an LDATS LDA summary plot
bottom panel showing the topic proportions over time/documents.
# S3 method for LDA_VEM plot(x, ..., xtime = NULL, xname = NULL, cols = NULL, option = "C", alpha = 0.8, LDATS = FALSE) LDA_plot_top_panel(x, cols = NULL, option = "C", alpha = 0.8, together = FALSE, LDATS = FALSE) LDA_plot_bottom_panel(x, xtime = NULL, xname = NULL, cols = NULL, option = "C", alpha = 0.8, together = FALSE, LDATS = FALSE)
| x | Object of class |
|---|---|
| ... | Not used, retained for alignment with base function. |
| xtime | Optional x values used to plot the topic proportions according to a specific time value (rather than simply the order of observations). |
| xname | Optional name for the x values used in plotting the topic proportions (otherwise defaults to "Document"). |
| cols | Colors to be used to plot the topics.
Any valid color values (e.g., see |
| option | A |
| alpha | Numeric value [0,1] that indicates the transparency of the
colors used. Supported only on some devices, see
|
| LDATS |
|
| together |
|
NULL.
# \donttest{ data(rodents) lda_data <- rodents$document_term_table r_LDA <- LDA_set(lda_data, topics = 4, nseeds = 10) best_lda <- select_LDA(r_LDA)[[1]] plot(best_lda, option = "cividis") LDA_plot_top_panel(best_lda, option = "cividis") LDA_plot_bottom_panel(best_lda, option = "cividis") # }