View source: R/04.buildClassifier.R
buildClassifier | R Documentation |
Computes the conditional a-posterior probabilities of a categorical class variable given independent predictor variables using the Bayes rule.
buildClassifier(
Ndata.NaiveBayes,
Pdata.NaiveBayes,
upstream = 40L,
downstream = 30L,
wordSize = 6L,
alphabet = c("ACGT")
)
Ndata.NaiveBayes |
A data.frame, containing features for the negative
training data, described further in |
Pdata.NaiveBayes |
A data.frame, containing features for the positive
training data, described further in |
upstream |
An integer(1) vector, length of upstream sequence to retrieve. |
downstream |
An integer(1) vector, length of downstream sequence to retrieve. |
wordSize |
An integer(1) vector, size of the kmer feature for the upstream sequence. wordSize = 6 should always be used. |
alphabet |
A character(1) vector, a string containing DNA bases. By default, "ACTG". |
An object of class "naiveBayes".
Jianhong Ou
naiveBayes
if (interactive()){
data(data.NaiveBayes)
classifier <- buildClassifier(data.NaiveBayes$Negative,
data.NaiveBayes$Positive)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.