bag_signatures: Function that reduces a bag of words into a signature matrix...

Description Usage Arguments Value Examples

View source: R/klsh.R

Description

Function that reduces a bag of words into a signature matrix using multiple random projections

Usage

1
bag_signatures(sack_of_bags, p, weighting_table)

Arguments

sack_of_bags

Sack of bag of words

p

Number of random projections p

weighting_table

Weighting table (inverse document frequency)

Value

Computes a signature matrix using multiple random projections and the inverse document frequency weights

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)
bag_signatures(sack, p=5, idf)

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