getChildParentsFromGraph {MoTBFs} | R Documentation |
Extract the relationship between the variables of a dataset using the obtained network
getChildParentsFromGraph(graph, nameVars = NULL)
graph |
A structural network of the class |
nameVars |
A character array giving the names of the variables in the graph. By default it's NULL,
only put it when a graph of class |
A list of elements. Each element contains a vector with the name of a child and their parents.
## Data
data(ecoli)
ecoli <- ecoli[,-1] ## Sequence Name
## DAG1
dag1 <- LearningHC(ecoli)
dag1
plot(dag1)
getChildParentsFromGraph(dag1)
## DAG2
dag2 <- LearningHC(ecoli, numIntervals = 10)
dag2
plot(dag2)
getChildParentsFromGraph(dag2)