fits model to an input train data and trains the model.
$predict()
returns predictions by fitting the trained model on test data.
Arguments
prior
for detailed explanation of parameters, check: https://cran.r-project.org/package=naivebayes
prior
numeric vector with prior probabilities. vector with prior probabilities of the classes.
If unspecified, the class proportions for the training set are used.
If present, the probabilities should be specified in the order of the factor levels.
laplace
value used for Laplace smoothing. Defaults to 0 (no Laplace smoothing)
usekernel
if TRUE, density is used to estimate the densities of metric predictors