predict.w_naive_bayes {rbooster}R Documentation

Predict Discrete Naive Bayes

Description

Function for Naive Bayes algorithm prediction.

Usage

## S3 method for class 'w_naive_bayes'
predict(object, newdata = NULL, type = "prob", ...)

## S3 method for class 'w_discrete_naive_bayes'
predict(object, newdata, type = "prob", ...)

## S3 method for class 'w_gaussian_naive_bayes'
predict(object, newdata = NULL, type = "prob", ...)

Arguments

object

"w_bayes" class object..

newdata

new observations which predictions will be made on.

type

"pred" or "prob".

...

additional arguments.

Details

Calls predict.w_discrete_naive_bayes or predict.w_gaussian_naive_bayes accordingly

Type "pred" will give class predictions. "prob" will give probabilities for each class.

Value

A vector of class predictions or a matrix of class probabilities depending of type

See Also

[predict()], [rbooster::predict.w_discrete_naive_bayes()], [rbooster::predict.w_gaussian_naive_bayes()]


[Package rbooster version 1.1.0 Index]