powered by
Convert a bnc_dag to igraph and grain objects.
bnc_dag
igraph
grain
as_igraph(x)as_grain(x)
as_grain(x)
The bnc_bn object. The Bayesian network classifier.
bnc_bn
as_igraph(): Convert to a graphNEL.
as_igraph()
as_grain(): Convert to a grain.
as_grain()
data(car) nb <- bnc('nb', 'class', car, smooth = 1) # Requires the grain and igraph packages installed if (FALSE) g <- as_grain(nb) if (FALSE) gRain::querygrain.grain(g)$buying
Run the code above in your browser using DataLab