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

inspect_bnc_bnR Documentation

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

 
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)

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