predict.naiveBayes {crimelinkage} | R Documentation |
naiveBayes
objectThis does not include the log prior odds, so will be off by a constant.
## S3 method for class 'naiveBayes'
predict(object, newdata, components = FALSE,
vars = NULL, ...)
object |
a naive bayes object from |
newdata |
data frame of new predictors, column names must match NB names |
components |
(logical) return the log bayes factors from each component or return the sum of log bayes factors |
vars |
the names or column numbers of specific predictors. If NULL, then all predictors will be used |
... |
not currently used |
BF if components = FALSE
, the sum of log bayes factors, if
components = TRUE
the component bayes factors (useful for plotting).
It will give a warning, but still produce output if X is missing predictors. The output in this situation will be based on the predictors that are in X.
# See vignette: "Statistical Methods for Crime Series Linkage" for usage.