Learn R Programming

BiDAG (version 2.0.0)

compareDAGs: Comparing two DAGs

Description

This function compares one (estimated) DAG to another DAG (true DAG), returning a vector of 3 values: structural Hamming distance, number of true positive edges and number of false positive edges.

Usage

compareDAGs(eDAG, trueDAG)

Arguments

eDAG

an object of class graphNEL (package `graph'), representing the DAG which should be compared to a ground truth DAG or an ajacency matrix corresponding to the DAG

trueDAG

an object of class graphNEL (package `graph'), representing the ground truth DAG or an ajacency matrix corresponding to the DAG

Value

a vector of 5: SHD, number of true positive edges, number of false positive edges, number of false negative edges and true positive rate

Examples

Run this code
# NOT RUN {
Asiascore<-scoreparameters("bde",Asia)
# }
# NOT RUN {
eDAG<-orderMCMC(Asiascore)
compareDAGs(eDAG$max$DAG,Asiamat)
# }

Run the code above in your browser using DataLab