Learn R Programming

text2vec (version 0.2.0)

dtm_get_tf: TermFrequency scaling matrix construction from Document-Term-Matrix

Description

Creates TermFrequency (tf) scaling matrix from Document-Term-Matrix. For examples see get_dtm.

Usage

dtm_get_tf(dtm, norm = c("l1", "l2"))

Arguments

dtm
sparseMatrix - Document-Term-Matrix
norm
character - Norm used to normalize term vectors. 'l1' by default, i.e. scale by bumber of words in document.

See Also

dtm_get_idf, get_dtm