bnc | R Documentation |
A convenience function to learn the structure and parameters in a single
call. Must provide the name of the structure learning algorithm function;
see bnclassify
for the list.
bnc(
dag_learner,
class,
dataset,
smooth,
dag_args = NULL,
awnb_trees = NULL,
awnb_bootstrap = NULL,
manb_prior = NULL,
wanbia = NULL
)
dag_learner |
A character. Name of the structure learning function. |
class |
A character. Name of the class variable. |
dataset |
The data frame from which to learn network structure and parameters. |
smooth |
A numeric. The smoothing value ( |
dag_args |
A list. Optional additional arguments to |
awnb_trees |
An integer. The number ( |
awnb_bootstrap |
A numeric. The size of the bootstrap subsample,
relative to the size of |
manb_prior |
A numeric. The prior probability for an arc between the class and any feature. |
wanbia |
A logical. If |
data(car)
nb <- bnc('nb', 'class', car, smooth = 1)
nb_manb <- bnc('nb', 'class', car, smooth = 1, manb_prior = 0.3)
ode_cl_aic <- bnc('tan_cl', 'class', car, smooth = 1, dag_args = list(score = 'aic'))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.