inst/examples/test_bp_child.R

library("bnstruct")

# child_NA_5000 <- BNDataset(name = "Child")
# child_NA_5000 <- read.dataset(child_NA_5000, header.file="../bnstruct/inst/extdata/Child_data_na_5000.header",
#                               data.file="../bnstruct/inst/extdata/Child_data_na_5000.data",
#                               imputation = TRUE, bootstrap=FALSE, num.boots=3)
# save(child_NA_5000, file="data/child_NA_5000.rda")
# break
# print(mydata)

mydata <- child()

net <- BN(mydata)
print(net)
print(dag(net))
out <- learn.network(net, mydata, algo = "sem", scoring.func = "BDeu", struct.threshold = 0)

Try the bnstruct package in your browser

Any scripts or data that you put into this service are public.

bnstruct documentation built on Dec. 1, 2022, 1:22 a.m.