calc_idf {qtkit}R 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


[Package qtkit version 1.1.1 Index]