tf–idf

1 개요[ | ]

tf–idf, TFIDF, term frequency–inverse document frequency
빈도-역빈도 법, 단어 빈도-역문서 빈도
  • 정보 검색과 텍스트 마이닝에서 이용하는 가중치
  • 문서내 단어의 가중치를 구하는 알고리즘
  • 정보검색론의 기본 개념중 하나
  • 문서 간의 유사도 측정
  • 특정 단어의 문서내 중요도 측정
  • 핵심어 추출
  • 검색 랭킹 결정

2 예시[ | ]

Document 1
term count
this 1
is 1
a 2
sample 1
5
Document 2
term count
this 1
is 1
another 2
example 3
7
단어 "this"
  • [math]\displaystyle{ \mathrm {tf} ({\mathsf {''this''}},d_{1})={\frac {1}{5}}=0.2 }[/math]
  • [math]\displaystyle{ \mathrm {tf} ({\mathsf {''this''}},d_{2})={\frac {1}{7}}\approx 0.14 }[/math]
  • [math]\displaystyle{ \mathrm {idf} ({\mathsf {''this''}},D)=\log \left({\frac {2}{2}}\right)=0 }[/math]
  • [math]\displaystyle{ \mathrm {tfidf} ({\mathsf {''this''}},d_{1},D)=0.2\times 0=0 }[/math]
  • [math]\displaystyle{ \mathrm {tfidf} ({\mathsf {''this''}},d_{2},D)=0.14\times 0=0 }[/math]
단어 "example"
  • [math]\displaystyle{ \mathrm {tf} ({\mathsf {''example''}},d_{1})={\frac {0}{5}}=0 }[/math]
  • [math]\displaystyle{ \mathrm {tf} ({\mathsf {''example''}},d_{2})={\frac {3}{7}}\approx 0.429 }[/math]
  • [math]\displaystyle{ \mathrm {idf} ({\mathsf {''example''}},D)=\log \left({\frac {2}{1}}\right)=0.301 }[/math]
  • [math]\displaystyle{ \mathrm {tfidf} ({\mathsf {''example''}},d_{1},D)=\mathrm {tf} ({\mathsf {''example''}},d_{1})\times \mathrm {idf} ({\mathsf {''example''}},D)=0\times 0.301=0 }[/math]
  • [math]\displaystyle{ \mathrm {tfidf} ({\mathsf {''example''}},d_{2},D)=\mathrm {tf} ({\mathsf {''example''}},d_{2})\times \mathrm {idf} ({\mathsf {''example''}},D)=0.429\times 0.301\approx 0.129 }[/math]

3 같이 보기[ | ]

4 참고[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}