Description Usage Arguments Value Examples
View source: R/trainingSetGenerator.R
This function generates a training set with n legal/spam emails, according to the probability distributions in mailGenerator.
1 2 3 4 |
n |
number of emails to generate, defaults is 1000. |
spamPrev |
spam prevalence, defaults is 0.1. |
k |
number of words in each email. Defaults is 5. |
Names |
vector with the names of the words in the email. |
subsetSpam |
matrix where each row is a configurations of words
that have non-zero probability given that the email is spam.
Defaults is |
probSubsetSpam |
probability of the configurations in subsetSpam given
the email is spam. The probabilities for the rest of configurations are set
to 0. Defaults is |
This function returns a dataframe containing the generated emails.
1 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.