bags_to_tfidf: Computes a TF-IDF weight vectors for a set of word bags.

Description Usage Arguments References Examples

View source: R/RcppExports.R

Description

Computes a TF-IDF weight vectors for a set of word bags.

Usage

1

Arguments

data

the list containing the input word bags.

References

Senin Pavel and Malinchik Sergey, SAX-VSM: Interpretable Time Series Classification Using SAX and Vector Space Model. Data Mining (ICDM), 2013 IEEE 13th International Conference on, pp.1175,1180, 7-10 Dec. 2013.

Salton, G., Wong, A., Yang., C., A vector space model for automatic indexing. Commun. ACM 18, 11, 613-620, 1975.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
bag1 = data.frame(
   "words" = c("this", "is", "a", "sample"),
   "counts" = c(1, 1, 2, 1),
   stringsAsFactors = FALSE
   )
bag2 = data.frame(
   "words" = c("this", "is", "another", "example"),
   "counts" = c(1, 1, 2, 3),
   stringsAsFactors = FALSE
   )
ll = list("bag1" = bag1, "bag2" = bag2)
tfidf = bags_to_tfidf(ll)

Example output

Loading required package: Rcpp

jmotif documentation built on March 26, 2020, 7:23 p.m.