get_tf
From text2vec v0.3.0
by Dmitriy Selivanov
Term-frequency scaling matrix
This function creates a term-frequency (TF) scaling matrix from a document-term matrix.
Usage
get_tf(dtm, norm = c("l1", "l2"))
Arguments
- dtm
- a document-term matrix of class
dgCMatrix
ordgTMatrix
. - norm
character
the method used to normalize term vectors."l1"
by default, i.e., scale by the number of words in the document.
Value
ddiMatrix
TF scaling diagonal sparse matrix.
See Also
Community examples
Looks like there are no examples yet.