powered by
Naive Bayes using e1071::naiveBayes
nb(dataset, rvar, evar, laplace = 0, data_filter = "")
Dataset name (string). This can be a dataframe in the global environment or an element in an r_data list from Radiant
The response variable in the logit (probit) model
Explanatory variables in the model
Positive double controlling Laplace smoothing. The default (0) disables Laplace smoothing.
Expression entered in, e.g., Data > View to filter the dataset in Radiant. The expression should be a string (e.g., "price > 10000")
A list with all variables defined in nb as an object of class nb
See https://radiant-rstats.github.io/docs/model/nb.html for an example in Radiant
summary.nb to summarize results
summary.nb
plot.nb to plot results
plot.nb
predict.nb for prediction
predict.nb
# NOT RUN { result <- nb("titanic", "survived", c("pclass","sex","age")) # }
Run the code above in your browser using DataLab