predict.bayes.prmdt: predict.bayes.prmdt

View source: R/predict.R

predict.bayes.prmdtR Documentation

predict.bayes.prmdt

Description

Return prediction for a naiveBayes model.

Usage

## S3 method for class 'bayes.prmdt'
predict(object, newdata, type = "class", threshold = 0.001, eps = 0, ...)

Arguments

object

a naiveBayes model object for which prediction is desired.

newdata

an optional data frame in which to look for variables with which to predict.

type

type of prediction 'prob' or 'class' (default).

threshold

Value replacing cells with 0 probabilities.

eps

double for specifying an epsilon-range to apply laplace smoothing (to replace zero or close-zero probabilities by theshold).

...

additional arguments affecting the predictions produced.

Value

a vector or matrix of predictions for bayes model.


traineR documentation built on Nov. 10, 2023, 1:15 a.m.