calc_idf: Function to calculate the inverse document frequency given a...

Description Usage Arguments Value Examples

View source: R/klsh.R

Description

Function to calculate the inverse document frequency given a shingled bag of words

Usage

1
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

1
2
3
4
5
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))

klsh documentation built on Jan. 13, 2021, 8:05 p.m.