Learn R Programming

bnclassify (version 0.4.8)

nb: Learn a naive Bayes network structure.

Description

Learn a naive Bayes network structure.

Usage

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

Value

A bnc_dag object.

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.

Examples

Run this code
 
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