Common TF-IDF variants arise as key components in the test statistic of a penalized likelihood-ratio test for word burstiness
Organizations: SCHOOL OF MATHEMATICAL AND COMPUTATIONAL SCIENCES, UNIVERSITY OF PRINCE EDWARD ISLAND · CANADIAN CENTRE FOR CLIMATE CHANGE AND ADAPTATION, UNIVERSITY OF PRINCE EDWARD ISLAND · FACULTY OF SUSTAINABLE DESIGN ENGINEERING, UNIVERSITY OF PRINCE EDWARD ISLAND
Abstract
TF-IDF is a classical formula that is widely used for identifying important terms within documents. We show that TF-IDF-like scores arise naturally from the test statistic of a penalized likelihood-ratio test setup capturing word burstiness (also known as word over-dispersion). In our framework, the alternative hypothesis captures word burstiness by modeling a collection of documents according to a family of beta-binomial distributions with a gamma penalty term on the precision parameter. In contrast, the null hypothesis assumes that words are binomially distributed in collection documents, a modeling approach that fails to account for word burstiness. We find that a term-weighting scheme given rise to by this test statistic performs comparably to TF-IDF on document classification tasks. This paper provides insights into TF-IDF from a statistical perspective and underscores the potential of hypothesis testing frameworks for advancing term-weighting scheme development.
Figures & tables
| Symbol / Expr. | Name (Abbr.) | Description |
|---|---|---|
| Collection | Generic symbol for a collection of documents composed of distinct terms. | |
| Collection size | Number of documents in the collection. | |
| Vocabulary size | Number of distinct terms out of which collection documents are composed. | |
| ( ) | ’th term | Generic symbol for the ’th term in the vocabulary. |
| ( ) | ’th document | Generic symbol for the ’th document in the collection. |
| Binary term frequency (BTF) | Indicator function defined as if the ’th term occurs in the ’th document, and otherwise. |
| TF–IDF | ||||||
| Document Class | Precision | Recall | F1 | Precision | Recall | F1 |
| alt.atheism | 0.82 | 0.82 | 0.82 | 0.79 | 0.76 | 0.78 |
| comp.graphics | 0.61 | 0.76 | 0.68 | 0.74 | 0.69 | 0.71 |
| comp.os.ms-windows.misc | 0.86 | 0.10 | 0.17 | 0.84 | 0.45 | 0.58 |
| comp.sys.ibm.pc.hardware | 0.52 | 0.78 | 0.62 | 0.62 | 0.76 | 0.69 |
| comp.sys.mac.hardware | 0.73 | 0.85 | 0.78 | 0.86 | 0.75 | 0.80 |
| TF–IDF | ||||||
| Document Class | Precision | Recall | F1 | Precision | Recall | F1 |
| acq | 0.98 | 0.91 | 0.94 | 0.95 | 0.99 | 0.97 |
| crude | 0.90 | 0.93 | 0.92 | 0.91 | 0.87 | 0.89 |
| earn | 0.95 | 0.97 | 0.96 | 0.99 | 0.98 | 0.98 |
| grain | 0.91 | 1.00 | 0.95 | 1.00 | 0.30 | 0.46 |
| interest | 0.87 | 0.74 | 0.80 | 0.98 | 0.52 | 0.68 |
Statistical Hypothesis Testing
Statistical hypothesis testing develops methods for assessing evidence against a stated null while controlling false-positive and false-negative rates.
See all 101 papers