tfidf: Term Frequency * Inverse Document Frequency
Description
Convert a count matrix to the corresponding tfidf matrix.
Usage
tfidf(x, freq=FALSE)
Arguments
x
A matrix or simple_triplet_matrix.
freq
An indicator for whether x is already a frequency matrix.
Value
A matrix with entries $f_{ij} \log[ n/d_j ]$, where $f_{ij}$ is term-j frequency in document-i,
and $d_j$ is the number of documents containing term-j.