The functions naivebayes returns an object of the type
naivebayes
.
An object of class 'naivebayes
' is a list with at least
the following components:
Matrix with prior probabilities, i.e. marginal class probabilities Pr(class)
list of matrices with conditional probabilities of the features given the classes (one list element per class), Pr(x|class)
Names (character vector) of the classes
Names of predictors
Conditional model for each predictor
Model design object
The function call which instantiated the object
objects of the S3 class 'naivebayes
'
The following S3 generic functions are available for an object
of class naivebayes
:
predict
Predict class probabilities for new features data.
print
Basic print method.
## See example(naivebayes) for examples