Description Usage Arguments Value Slots Author(s) References Examples
SpNaBaModel is used to store information about the naive Bayes model.
1  | SpNaBaModel(ModMatrix, Counts, Probs, Epsilon, Score, ...)
 | 
ModMatrix | 
 a SpNaBaMatrix. See   | 
Counts | 
 a SpNaBaCounts. See   | 
Probs | 
 a SpNaBaProbs. See   | 
Epsilon | 
 a SpNaBaEps. See   | 
Score | 
 a SpNaBaScore. See   | 
... | 
 argument pass to other methods  | 
An object of class SpNaBaModel. See slot section for more details.
ModMatrixa SpNaBaMatrix. See SpNaBaMatrix.
Countsa SpNaBaCounts. See SpNaBaCounts.
Probsa SpNaBaProbs. See SpNaBaProbs.
Epsilona SpNaBaEps. See SpNaBaEps.
Scorea SpNaBaScore. See SpNaBaScore.
Enrique Del Callejo Canal (edelcallejoc@gmail.com), based on implemented algortihms in web platform SPECIES (see References).
http://species.conabio.gob.mx/
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25  | # Using SpNaBaMatrix constructor ----------------------
a <- matrix(rbinom(100, 100, runif(100, 0, 0.1)), nrow = 10, ncol = 10,
  dimnames = list(paste0("id:", 1:10), letters[1:10]))
x.mat <- SpNaBaMatrix(freqmatrix = a)
# Counts calculation ----------------------------------
x.counts <- counts(x.mat)
# Probability calculation -----------------------------
x.probs <- probs(x.counts)
# Estimating epsilon ----------------------------------
x.eps <- epsilon(x.counts, x.probs)
# Estimating Score
x.score <- score(x.probs)
x.model <- SpNaBaModel(x.mat, x.counts, x.probs,
                       x.eps, x.score)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.