The hypergeometric test performs comparably to TF-IDF on standard text analysis tasks

Paul Sheridan, Mikael Onsjö
2/26/2020
cs.IR

Official code: Sheridan-Stable/hgt-tfidf (3 stars, Jupyter Notebook, MIT, last commit 2026-02-05).

Abstract

Term frequency-inverse document frequency, or TF-IDF for short, and its many variants form a class of term weighting functions the members of which are widely used in text analysis applications. While TF-IDF was originally proposed as a heuristic, theoretical justifications grounded in information theory, probability, and the divergence from randomness paradigm have been advanced.

Show full abstract

In this work, we present an empirical study showing that TF-IDF corresponds very nearly with the hypergeometric test of statistical significance on selected real-data document retrieval, summarization, and classification tasks. These findings suggest that a fundamental mathematical connection between TF-IDF and the negative logarithm of the hypergeometric test P-value (i.e., a hypergeometric distribution tail probability) remains to be elucidated. We advance the empirical analyses herein as a first step toward explaining the long-standing effectiveness of TF-IDF from a statistical significance testing lens. It is our aspiration that these results will open the door to the systematic evaluation of significance testing derived term weighting functions in text analysis applications.

View on arXivView PDF

Code Implementations(1)

MIT

This repository contains computer code for the manuscript “The hypergeometric test performs comparably to TF-IDF on standard text analysis tasks”.

30Jupyter NotebookFeb 18, 20209 months agoMIT

Similar Papers

Cite this paper

@article{sheridan2020hypergeometric,
  title  = {The hypergeometric test performs comparably to TF-IDF on standard text analysis tasks},
  author = {Paul Sheridan and Mikael Onsjö},
  year   = {2020},
  eprint = {2002.11844},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2002.11844}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2002.11844.svg)](https://codeofpaper.com/paper/2002.11844)

Discussion