一般的なテキストマイニングの可視化

Rで学ぶBag-of-Wordsによるテキストマイニング

Ted Kwartler

Instructor

なぜ可視化するのか

  • 良い可視化は素早い結論につながります
  • 脳は視覚情報を効率よく処理します
Rで学ぶBag-of-Wordsによるテキストマイニング

前提の整理

ツイートのトピック

Rで学ぶBag-of-Wordsによるテキストマイニング

前提の整理

ベクトル

Rで学ぶBag-of-Wordsによるテキストマイニング

tm による出現頻度プロット

# Convert TDM to matrix
coffee_m <- as.matrix(coffee_tdm)

# Sum rows and sort by frequency term_frequency <- rowSums(coffee_m) term_frequency <- sort(term_frequency, decreasing = TRUE)
# Create a barplot barplot(term_frequency[1:10], col = "tan", las = 2)

出現頻度プロット

Rで学ぶBag-of-Wordsによるテキストマイニング

qdap による出現頻度プロット

# Load qdap package
library(qdap)

# Find term frequencies frequency <- freq_terms( tweets$text, top = 10, at.least = 3, stopwords = "Top200Words" )
# Plot term frequencies plot(frequency)

 

qdapのプロット

Rで学ぶBag-of-Wordsによるテキストマイニング

練習しましょう!

Rで学ぶBag-of-Wordsによるテキストマイニング

Preparing Video For Download...