sampleBN: Function to sample instances from an artificial BN

Description Usage Arguments Value Examples

Description

Function to sample instances from an artificial BN

Usage

1
sampleBN(model, is_dir, cluster_id, num_simulations)

Arguments

model

is a list generated by the functions generate_artificial_BN or clusteringSomas

is_dir

is a binary array 1xn where n is the number of variables, it takes value 1 when the variable is directional and 0 if the variable is linear

cluster_id

the id of the cluster from the instance should be sample

num_simulations

number of instances to simulate from

Value

a matrix with the data simulated

Examples

1
2
3
is_dir <- c(rep(1,3),rep(0,7))
model  <- generate_artificial_BN(is_dir)
data <- sampleBN(model, is_dir, 1, 100)

sergioluengosanchez/EMS_clustering documentation built on May 31, 2019, 10:37 a.m.