Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Generate bayesian network sample data from learned network structure on R
#sudo apt install r-base-core #the latest version will not be installed by this command
#install.packages("bnlearn", dependencies = TRUE)
res = read.bif("./alarm.bif") #
sim = rbn(res, 500, alarm)
write.csv(sim, "./alarm.csv")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment