rproject_bags {klsh} | R Documentation |
Function that generates unit random vectors and takes (weighted) projections onto the random unit vectors given a bag of words
Description
Function that generates unit random vectors and takes (weighted) projections onto the random unit vectors given a bag of words
Usage
rproject_bags(sack_of_bags, weighting_table)
Arguments
sack_of_bags |
Sack of bag of words |
weighting_table |
Weighting table (inverse document frequency) |
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))
rproject_bags(sack, idf)
[Package klsh version 0.1.0 Index]