tf-idf
出典: フリー百科事典『ウィキペディア(Wikipedia)』 (2022/03/28 23:00 UTC 版)
ナビゲーションに移動 検索に移動tf-idfの重み付け手法を変形したものは、ユーザーのクエリ(検索ワード)から文書の適合性を得点化し、順位づけする際の中心的なツールとして、よく検索エンジンで用いられている。tf-idfは、自動要約や文書分類といった様々な分野において、ストップワードによるフィルタリングを行うことでうまく動作できる。
最もシンプルな順位付け関数(ranking function)の一つは、クエリに含まれる語ごとのtf-idfの和を計算することで実装される。たくさんのより洗練された順位付け関数はこのシンプルなモデルの変形となっている。
動機
Term frequency (単語頻度)
英語文書の集合を扱っていると仮定し、それらを"the brown cow"というクエリにより関連する順に並べたいとする。問題に取り掛かる上で、シンプルな方法は、"the"、"brown"、"cow"の3つの単語のすべてを含まない文書を除くことであるが、これではたくさん文書がまだ残ってしまう。さらにそれらを区別するために、もしかすると各文書で各単語が何度出現しているかを数えるかもしれない。ある文書内にある単語が何回出現したかという数をその単語のterm frequencyと呼ぶ。しかし、文書の長さにばらつきがある場合、調整が必要となることが多い(詳細は定義を参照)。最初の語の重み付け手法はHans Peter Luhn(1957)により、その内容は以下のようにまとめられうる[3]。
文書内の単語の重みは、その出現頻度に単純に比例する。
Inverse document frequency (逆文書頻度)
"the"という語が非常に普遍であるために、より意味のある単語である"brown"や"cow"に十分な重みを与えず、term frequencyは、"the"という語をより高頻度に含む文書を誤って強調してしまう傾向がある。"the"という語は、普遍的ではない"brown"や"cow"という語とは異なり、文書や単語がクエリに関連している・関連していないと区別するためのキーワードとしてよいものではない。それゆえに、文書集合において非常に出現頻度の高い語の重みを減らし、珍しい語の重みを増加させるため、inverse document frequencyが用いられている。
Karen Spärck Jones(1972) はInverse Document Frequency (idf) と呼ばれる単語の特異性の統計的解釈を考案し、その考えは単語の重み付けの基礎概念となっている[4]。
単語の特異性は、その単語が出現した文書数の逆関数によって定量化できる。
定義
- tf-idfは2つの統計量、term frequency (tf)と、inverse document frequency (idf) の積である。双方の統計量には、厳密な値を決定するために様々な手法が存在している。
- 式は、文書やWebページにおけるキーワードやフレーズの重要性を定義することを目的とする。
重み付け手法 | tf 重み | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
binary
(2値) |
Term frequency–inverse document frequency (tf-idf)ここで、tf-idfは次のように計算される。 tf-idfの重みが高くなるのは、(与えられた文書内で)その単語の単語頻度(term frequency, tf)が高く、かつ、文書集合全体においてその単語の文書頻度(document frequency, df)が低い場合である。それゆえに、重みは普遍的な語をフィルタする傾向がある。idfの対数内の分数は常に1以上となるため、idf(とtf-idf)の値は常に0以上になる。単語がより多くの文書に現れる場合、対数の中の分数は1に近づき、それゆえにidfとtf-idfは0に近づく。
「tf-idf」の続きの解説一覧
「tf-idf」の関連用語
検索ランキング
tf-idfのページの著作権
ビジネス|業界用語|コンピュータ|電車|自動車・バイク|船|工学|建築・不動産|学問
©2024 GRAS Group, Inc.RSS |