Predictions from a BayesClassifier model
predict.BayesClassifier.Rd
Predicts new data using a BayesClassifier object
Usage
# S3 method for BayesClassifier
predict(object, newdata, type = "probs", ...)
Arguments
- object
a BayesClassifier object
- newdata
a data.frame containing new features to predict
- type
type of return value, either "probs", or "class"
- ...
currently unused
Details
Given a BayesClassifier object and a data.frame of new data, predictions are computed for each data point. Two types of predictions are available:
´probs´: returns the matrix of log-class probabilities for each sample and class
´class´: returns the vector of class labels with the highest predictive probabilities for each sample