Learn R Programming

radiant.model (version 0.8.0)

nb: Naive Bayes using e1071::naiveBayes

Description

Naive Bayes using e1071::naiveBayes

Usage

nb(dataset, rvar, evar, laplace = 0, data_filter = "")

Arguments

dataset

Dataset name (string). This can be a dataframe in the global environment or an element in an r_data list from Radiant

rvar

The response variable in the logit (probit) model

evar

Explanatory variables in the model

laplace

Positive double controlling Laplace smoothing. The default (0) disables Laplace smoothing.

data_filter

Expression entered in, e.g., Data > View to filter the dataset in Radiant. The expression should be a string (e.g., "price > 10000")

Value

A list with all variables defined in nb as an object of class nb

Details

See https://radiant-rstats.github.io/docs/model/nb.html for an example in Radiant

See Also

summary.nb to summarize results

plot.nb to plot results

predict.nb for prediction

Examples

Run this code
# NOT RUN {
result <- nb("titanic", "survived", c("pclass","sex","age"))

# }

Run the code above in your browser using DataLab