2. テキストマイニングによる予測
• 2005年あたりからCGMのテキストマイニングによる
売上・価格変動・選挙・株価予測が盛んに
– [Mishne 05] Predicting Movie Sales from Blogger Sentiment
– [Archak 07] Show me the Money! Deriving the Pricing Power
of Product Features by Mining Consumer Reviews
– [Liu 07] ARSA: A Sentiment-Aware Model for Predicting Sales
Performance Using Blogs
– [Tumasjan 10] Predicting Elections withTwitter
– [Bolle 10] Twitter mood predicts the stock market
– [Zhang 10] Predicting Stock Market Indicators Through Twitter
• 要となるのが
– 評判分析(Sentiment Analysis)
8. TF - Term Frequency
• ある単語が各々の文章にどのくらい出現するか?
ni 単語iの出現頻度
tf i
k
nk 文書で出現する総単語数
• 問題点
– すべての単語が等しい重要度の場合
• 例:ツール,エラー,ファイル…
• 解決方法
– 頻繁に登場する語の影響力を薄める → そこでidf
9. IDF - Inverse Document Frequency
• ある単語がどのくらいの数の文書に出現するか?
総ドキュメント数
|D|
idf i log 単語iを含む
| {d : d ti } | ドキュメント数
term df idf
レア語では高く car 18,165 1.65
auto 6723 2.08
頻出語では低く
insurance 19,241 1,62
best 35,235 1.5
10. TF-IDFによるスコアリング
• 以下の場合に高い
– 少数のドキュメントにtがたくさん出現する場合
• 以下の場合に低い
– ひとつのドキュメントに t が少なく出現する場合
– たくさんのドキュメントに t が出現する場合
11. ベクトル空間モデル(Vector Space Model)
• 文章を単語の集合(ベクトル)と考える
– cos類似度でランク付けできる d
������(������1 ) ∙ ������(������2 )
������������������(������1 , ������2 ) =
������ ������1 |������(������2 )|
q
Query document
Q A B C D E
{D, E}
term
0 1.0 0 1.5 0.4
term
1 1 0.8
2 0.1 2 0.4 1.2 0.2 {A, B, E}
3 3 1.5
4 4 0.5
5 5 1.6 2.5
6 6 0.2 1.0
1.5
20. 抽出した評価表現[1]
• Unigram
• 1.350 bad==1 and label is 'neg'
• 1.069 worst==1 and label is 'neg'
• 1.063 script==1 and label is 'neg'
• 0.957 great==1 and label is 'pos'
• 0.892 boring==1 and label is 'neg'
• 0.884 unfortunately==1 and label is 'neg'
• 0.879 should==1 and label is 'neg'
• 0.832 nothing==1 and label is 'neg'
• 0.828 waste==1 and label is 'neg'
• 0.828 supposed==1 and label is 'neg'
• 0.785 best==1 and label is 'pos‘
• 0.768 only==1 and label is 'neg'
21. 抽出した評価表現[2]
• Bigram
• 0.995 could_been==1 and label is 'neg'
• 0.953 one_best==1 and label is 'pos'
• 0.819 bad_movie==1 and label is 'neg'
• 0.757 going_waste==1 and label is 'neg'
• 0.754 waste_any==1 and label is 'neg'
• 0.743 man_who==1 and label is 'pos'
• 0.740 film_extraordinarily==1 and label is 'neg'
• 0.740 more_words==1 and label is 'neg'
• 0.740 horrendous_going==1 and label is 'neg'
• 0.740 extraordinarily_horrendous==1 and label is 'neg'
• 0.696 very_well==1 and label is 'pos'
• 0.686 too_bad==1 and label is 'neg'