sample_MoTBFs | R Documentation |
This function generates a sample from conditional MoTBFs.
sample_MoTBFs(bn, dag, obs = NULL, size, force_size = T)
bn |
A list of lists obtained from the function MoTBFs_Learning. |
dag |
An object of class |
obs |
A |
size |
A non-negative integer giving the number of instances to be generated. |
force_size |
|
A data.frame
containing the generated sample.
## 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 obs <- data.frame(lip = "0.48", alm1 = 0.55, gvh = 1, stringsAsFactors=FALSE) ## Get the conditional sample sample_MoTBFs(bn, dag, obs, size = 10)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.