Learn R Programming

bnclassify (version 0.4.8)

bnc_bn: Bayesian network classifier with structure and parameters.

Description

A Bayesian network classifier with structure and parameters. Returned by lp and bnc functions. You can use it to classify data (with predict). Can estimate its predictive accuracy with cv, plot its structure (with plot), print a summary to console (print), inspect it with functions documented in inspect_bnc_bn and inspect_bnc_dag, and convert it to mlr, grain, and graph objects --see as_mlr and grain_and_graph.

Arguments

Examples

Run this code
data(car)
tan <- bnc('tan_cl', 'class', car, smooth = 1)   
tan
p <- predict(tan, car)
head(p)
if (FALSE) plot(tan)
nparams(tan)

Run the code above in your browser using DataLab