calc_idf {klsh} | R Documentation |
Function to calculate the inverse document frequency given a shingled bag of words
Description
Function to calculate the inverse document frequency given a shingled bag of words
Usage
calc_idf(sack_of_bags)
Arguments
sack_of_bags |
Sack of bag of words |
Value
Computes the inverse document frequency for a bag of words
Examples
data(RLdata500)
data.500 <- RLdata500[-c(2,4)]
sack <- sacks_of_bags_of_words(data.500[1:3,c(-2)],k=2)
(idf <- calc_idf(sack))
match(names(sack[[1]]), names(idf))
[Package klsh version 0.1.0 Index]