new_bnet: New bnet object

Description Usage Arguments Value Examples

Description

Create a bnet object with prescribed variables and optionally arcs selected via adjacency matrix.

Usage

1
new_bnet(variables, adj.mat = NULL)

Arguments

variables

vector of variables names

adj.mat

adjacency matrix, not symmetric, acyclicity will be checked for every possible arcs.

Value

a bnet object, that is a list with components $variables, bnet$variables is also a list with component named as variables, each element represents a node and is composed of three elements: name, parents and prob (initially set to NULL until fitting of the bnet)

Examples

1
2
3
bnet1<-new_bnet(c("a","b"))
summary(bnet1)
plot(bnet1)

gherardovarando/Rbnet documentation built on May 17, 2019, 4:18 a.m.