A function for visualizing the relationship between words and terms within each topic
Arguments
- lda
The LDA object made with fit_LDAs or par_fit_LDAs
- orig_data
Data object which was originally used
- gamma_threshold
Desired threshold for Bigram Viz, default is 0.75
- top_n
How many of the most frequently used terms to include per topic
- min_freq
The minimum frequency of any incuded bigram
Examples
ldas <- SegmentR:::test_data(explore = FALSE)$lda
#> removing stopwords
#> Making DTMs
#> making tuning grid
#> setting up LDAs
ldas <- ldas %>% dplyr::filter(k == 3, freq_cutoff == 1)
data <- ldas$data[[1]]
ldas <- ldas$lda[[1]]
bigrams_segmentr(ldas, data, top_n = 5, min_freq = 2)
#> $topic_1_bigram
#>
#> $topic_2_bigram
#>
#> $topic_3_bigram
#>