calculateTfidf | R Documentation |
The grouped dataframe here acts as a "Document" from the perpective of the TFIDF calculation but might be a person TODO: fix methods of calculating tfidf
calculateTfidf( groupedDf, sampleVars, countVar = NULL, idfDf = NULL, k1 = 1.2, b = 0.95 )
groupedDf |
a dataframe whose grouping defines the "term" |
sampleVars |
the column(s) that contains the unique id of a sample, i.e. traditionally a "document" but could be a patient. escaped by vars(...). This can include an outcome variable. |
countVar |
a field that contains a count. If this is given then it is assumed that the concept & document combinations are unique |
idfDf |
an optional data frame containing idf information from this or another corpus |
k1 |
default 1.2 - okapi BM25 parameter |
b |
default 0.95 - okapi BM25 |
a data frame with tfidf stats for each concept in each group (i.e. document)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.