nb {bnclassify}R Documentation

Learn a naive Bayes network structure.

Description

Learn a naive Bayes network structure.

Usage

nb(class, dataset = NULL, features = NULL)

Arguments

class

A character. Name of the class variable.

dataset

The data frame from which to learn the classifier.

features

A character vector. The names of the features. This argument is ignored if dataset is provided.

Value

A bnc_dag object.

Examples

 
data(car)
nb <- nb('class', car)   
nb2 <- nb('class', features = letters[1:10])
## Not run: plot(nb2)

[Package bnclassify version 0.4.8 Index]