powered by
This function extracts an adjacency matrix of a maximum scoring DAG from the result of the MCMC run.
getDAG(x, amat = TRUE, cp = FALSE)
adjacency matrix of a maximum scoring DAG (or CPDAG) discovered/sampled in one MCMC run
object of class 'orderMCMC','partitionMCMC' or 'iterativeMCMC'
logical, when TRUE adjacency matrix is returned and object of class 'graphNEL' otherwise
logical, when TRUE the CPDAG (equivalence class) is returned and DAG otherwise; FALSE by default
myscore<-scoreparameters("bge", Boston) if (FALSE) { itfit<-learnBN(myscore,algorithm="orderIter") maxEC<-getDAG(itfit,cp=TRUE) }
Run the code above in your browser using DataLab