calc_idf: Calculate Inverse Document Frequency

View source: R/calc_disp.R

calc_idfR Documentation

Calculate Inverse Document Frequency

Description

Computes the inverse document frequency (IDF) for each term in a term-document matrix. IDF is calculated as log(N/df) where N is the total number of documents and df is the document frequency of the term.

Usage

calc_idf(tdm)

Arguments

tdm

A term-document matrix

Value

A numeric vector of inverse document frequencies for each term


qtkit documentation built on April 4, 2025, 4:47 a.m.