1 / 42

IIR 輪講復習 #6 Scoring, term weighting, and the vector space model

IIR 輪講復習 #6 Scoring, term weighting, and the vector space model. お知らせ. たつをさんによる補足情報 http://chalow.net/clsearch.cgi?cat=IIR 復習資料おきば http://bloghackers.net/~naoya/iir/ppt/. 参考. http://www-csli.stanford.edu/~hinrich/information-retrieval-book.html 本資料は書籍の輪読会に向けたサマリ

bin
Télécharger la présentation

IIR 輪講復習 #6 Scoring, term weighting, and the vector space model

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. IIR輪講復習#6 Scoring, term weighting, and the vector space model

  2. お知らせ • たつをさんによる補足情報 • http://chalow.net/clsearch.cgi?cat=IIR • 復習資料おきば • http://bloghackers.net/~naoya/iir/ppt/

  3. 参考 • http://www-csli.stanford.edu/~hinrich/information-retrieval-book.html • 本資料は書籍の輪読会に向けたサマリ • 本資料内で一部上記ドキュメント, スライドからの引用あり

  4. 6章のテーマ • 検索結果のスコアリング (ranking) • Parametric and zone インデックス • 単語に対する重み付け (tf-idf) • ベクトル空間モデル (Vector space model) • 次章以降への布石

  5. Parametric and zone index

  6. Parametric Search • メタデータを検索に使う • Language = French • Format = pdf • Subject = Physics etc. • Date = Feb 2000 • 利点 • メタデータを軸に検索 • スコアリング

  7. "Zone" とは • 値が free text のフィールド • タイトル、abstract、bibliography • 無限超

  8. Parametric and zone search • physics in Title and Einstein in Bibliography and Quantum* in Body

  9. メタデータのインデックス (1) "Zone index"

  10. メタデータのインデックス (2) • 利点 • 辞書サイズ • "Weighted zone scoring"

  11. Weighted zone scoring

  12. スコア • 検索結果を有用と思われる順に並び替えるための指標 • [0, 1]区間の何らかの値 (= スコア) を各ドキュメントに付与

  13. Weighted zone scoring • Zone によるスコアリング手法 • Zone 毎に重みを変える • 例: 著者よりタイトル、タイトルよりも本文が重要

  14. 例 "shakespeare" で検索 • あるドキュメント d のスコアの算出 • 重み ... author = 0.2, title = 0.3, body = 0.5 とする • 0.2 + 0.3 + 0.5 = 1 Score = 0.2 * <"shakespeare" in author> + 0.3 * <"shakespeare" in title> + 0.5 * <"shakespeare" in body> 0 or 1

  15. 例 "shakespeare" で検索 (つづき) • 各ゾーンの "shakespeare" の検索結果 • author ... なし • title ... ヒット • body ... ヒット Score = 0.2 * 0 + 0.3 * 1 + 0.5 * 1 = 0.8

  16. Weighted zone score • 線形結合 • Weighted zone scoring は線形結合 • g は [0, 1]区間 • g の合計は 1 ※ siをベクトルとみて "linear combination" としているようだが、ここでは siは一次元

  17. Weighted zone score 算出 先のインデックスの構造が活きる

  18. 0.7 0.7 0.4 0.4 Score accumulation (from lecture06-tfidf.ppt) • bill OR rights • 各posting 一つで weight が決められる 1 2 3 5 1.author, 1.body 2.author, 2.body 3.title bill 3.title, 3.body 5.title, 5.body rights

  19. g の決め方 • 専門家による決めうち • 機械学習

  20. 機械学習による g の決定 → 近似 • giの学習 → 単純な最適化問題へ近似 学習に使う材料Φ... (コーパスd、クエリq、人力による適合性判断結果 r (0 or 1)) これを最小化する g を選ぶ (機械学習 → 最小化問題への近似)

  21. Term frequency and weighting

  22. tf-idfとは • tft,d (term frequency) と dft (document frequency) を基にしたドキュメントの重み付け手法 • 文章中の特徴語を抽出するアルゴリズム (ja.wikipedia.org)

  23. term frequency による重み付け • tft,dを重み付けに使う • "Bag of words" モデル • John is quicker than Mary • Mary is quicker than John • ドキュメントはベクトル

  24. tft,dからのスコアリング • Score(q,d) = tqtft,d • 問題点 • すべての単語が等しい重要度 • is, the, of ... • → コレクションの中で頻繁に登場する語の影響力を薄めたい

  25. cfと df • cf (collection frequency)と dfの傾向の違い • cf ... 語が collection 全体で何回出現するか • dfの方がベター

  26. idft - inverse document frequency • レア語では高く • 頻出語では低く

  27. tf-idft,d • t が少数のドキュメントにたくさん出現するとき最高 • 以下の場合に低い • ひとつのドキュメントに t が少なく出現する場合 • たくさんのドキュメントに t が出現する場合 • 全ドキュメントトに t が出現する ... 最低

  28. tf-idfベクトル

  29. ベクトル空間モデル

  30. Vector space model • ベクトル空間モデル • クエリやドキュメントをベクトル化して無次元のベクトル空間に展開 • ベクトル空間内で "近い" ベクトルを探す → 類似文書 • 線形代数、統計 • IR の基盤 • クエリに基づいたドキュメントのスコアリング • ドキュメント分類 • ドキュメントクラスタリング

  31. Vector space model • ベクトル成分の算出方法に依存しない • tf-idf でも tf でも他でも ok • IR の問題 → 線形代数の計算 • 任意の計算で算出された成分によるドキュメントベクトルをベクトル空間に展開して、以降は線形代数の計算モデルで各種計算

  32. Intuition (from lecture06-tfidf.ppt) t3 d2 d3 d1 θ φ t1 d5 t2 d4 Postulate: Documents that are “close together” in the vector space talk about the same things.

  33. Cosine similarity • 二つのベクトルの類似度 = 2ベクトルが作る cosΘ を求める式に等しい • ∵ 相関係数 = cosΘ

  34. Cosine smilarirty (2) • ベクトルの長さで正規化してから演算 • ベクトルをベクトル長で割る • 長さで正規化されたベクトル = 単位ベクトル 単位ベクトルの内積

  35. Cosine similarity (3) • 2ベクトルの内積が最も大きいもの = 最も相関度が高い

  36. • 3つの小説の 3 語の tf • "Sense and Sensibility" • "Pride and Prejudice" • "Wuthering Heights" ベクトル長で正規化 SaS・PaP = 0.999 SaS・WH = 0.888 ∴ SaSに近いのはWHよりPaP

  37. クエリもベクトル • query "jealous gossip" • (affection, jealous, gossip) = (0, 1, 1) • 正規化 → (0, 0.77, 0.77) • 内積 • q・SaS = 0.074, q・PaP = 0.085, q・WH = 0.509 • ∴ WH, SaS, PaP の順

  38. ベクトル空間スコアの計算

  39. ベクトル空間モデルの内積計算コスト • M次元の内積計算を N ドキュメント数 • M ... 辞書の単語数。万単位 • N ... ドキュメント数 • 計算コストを下げる手法 → 7章 • M x N の行列と見て計算 → 18章

  40. tf-idf以外の重み付け

  41. tf-idf以外 • Sublinear tf scaling • Maximum tf normalization

  42. まとめ • Parametric and zone インデックスを使う利点2つ • メタデータでの絞り込み • Weighted zone scoring • 単語の重み付けの手法 • tf-idf ほか • 単語の重みからドキュメントをベクトルに • Vector space model • Cosine similarity • IR の問題を線形代数の問題へ変換

More Related