# NOT RUN {
## Dataset
data("ecoli", package = "MoTBFs")
data <- ecoli[,-c(1,9)]
## Get directed acyclic graph
dag <- LearningHC(data)
## Learn bayesian network
bn <- MoTBFs_Learning(dag, data = data, numIntervals = 4, POTENTIAL_TYPE = "MTE")
## Specify the evidence set and target variable
obs <- data.frame(lip = "0.48", alm1 = 0.55, gvh = 1, stringsAsFactors=FALSE)
node <- "alm2"
## Get the conditional distribution of 'node' and the generated sample
forward_sampling(bn, dag, target = node, evi = obs, size = 10, maxParam = 15)
# }
Run the code above in your browser using DataLab