nb: Learn a naive Bayes network structure.

View source: R/learn-struct.R

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

bnclassify documentation built on Nov. 16, 2022, 5:08 p.m.