整理 LDA 輸出
我們已從上一個練習載入 LDA 輸出 lda_out。輸出中有許多值得關注的內容,而主題本身是普遍關注的焦點。讓我們把這些值提取出來。
本練習屬於課程
R 文字分析入門
練習說明
- 使用
glimpse()列印主題模型輸出的摘要。 - 將詞彙機率的矩陣整理為整齊格式。
- 依詞彙機率由高到低排列主題。
動手互動練習
試著完成這個範例程式碼,體驗一下這個練習。
# Glimpse the topic model output
___(___)
# Tidy the matrix of word probabilities
lda_topics <- ___ %>%
___(__)
# Arrange the topics by word probabilities in descending order
___ %>%
___(___)