Learn R Programming

bnclassify (version 0.4.8)

inspect_bnc_bn: Inspect a Bayesian network classifier (with structure and parameters).

Description

Functions for inspecting a bnc_bn object. In addition, you can query this object with the functions documented in inspect_bnc_dag.

Usage

nparams(x)

manb_arc_posterior(x)

awnb_weights(x)

params(x)

values(x)

classes(x)

Arguments

x

The bnc_bn object. The Bayesian network classifier.

Functions

  • nparams(): Returns the number of free parameters in the model.

  • manb_arc_posterior(): Returns the posterior of each arc from the class according to the MANB method.

  • awnb_weights(): Returns the AWNB feature weights.

  • params(): Returns the list of CPTs, in the same order as vars.

  • values(): Returns the possible values of each variable, in the same order as vars.

  • classes(): Returns the possible values of the class variable.

Examples

Run this code
 
data(car)
nb <- bnc('nb', 'class', car, smooth = 1)
nparams(nb)
nb <- bnc('nb', 'class', car, smooth = 1, manb_prior = 0.5)
manb_arc_posterior(nb)
nb <- bnc('nb', 'class', car, smooth = 1, awnb_bootstrap = 0.5)
awnb_weights(nb)

Run the code above in your browser using DataLab