nb: Naive Bayes using e1071::naiveBayes

Description Usage Arguments Details Value See Also Examples

View source: R/nb.R

Description

Naive Bayes using e1071::naiveBayes

Usage

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

Arguments

dataset

Dataset

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")

Details

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

Value

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

See Also

summary.nb to summarize results

plot.nb to plot results

predict.nb for prediction

Examples

1
2
nb(titanic, "survived", c("pclass", "sex", "age")) %>% summary()
nb(titanic, "survived", c("pclass", "sex", "age")) %>% str()

radiant-rstats/radiant.model documentation built on Nov. 13, 2018, 7 a.m.