Description Usage Arguments Value Examples
this function takes a token and calculates the conditional probability of the token appearing in each classLabel. This can then be used to get the likelihood ratio of the token belonging to each classLabel.
1 | conditionalProbability(token, termFrequency)
|
token |
a single token |
termFrequency |
an object of class TermFrequency |
a conditional probability for the token belonging to each class given it's term frequency
1 2 3 | corpusEx <- Corpus(list('first' = c('a single entry document'), 'second' = c('a two entry document','with two separate entries')))
termFreqEx <- TermFrequency(corpusEx)
P_token <- conditionalProbability( 'entr', termFreqEx)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.