powered by
Learn a naive Bayes network structure.
nb(class, dataset = NULL, features = NULL)
A bnc_dag object.
bnc_dag
A character. Name of the class variable.
The data frame from which to learn the classifier.
A character vector. The names of the features. This argument is ignored if dataset is provided.
dataset
data(car) nb <- nb('class', car) nb2 <- nb('class', features = letters[1:10]) if (FALSE) plot(nb2)
Run the code above in your browser using DataLab