compareDBNs {BiDAG}R Documentation

Comparing two DBNs

Description

This function compares one (estimated) DBN structure to another DBN (true DBN). Comparisons for initial and transitional structures are returned separately if equalstruct equals TRUE.

Usage

compareDBNs(eDBN, trueDBN, struct = c("init", "trans"), b = 0)

Arguments

eDBN

an object of class graphNEL (or an ajacency matrix corresponding to this DBN), representing the DBN which should be compared to a ground truth DBN

trueDBN

an object of class graphNEL (or an ajacency matrix corresponding to this DBN), representing the ground truth DBN

struct

option used to determine if the initial or the transitional structure should be compared; accaptable values are init or trans

b

number of static variables in one time slice of a DBN; note that for function to work correctly all static variables have to be in the first b columns of the matrix

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

testscore<-scoreparameters("bge", DBNdata, DBN=TRUE, 
dbnpar=list(samestruct=TRUE, slices=5, b=3))
## Not run: 
DBNfit<-learnBN(testscore, algorithm="orderIter",moveprobs=c(0.11,0.84,0.04,0.01))
compareDBNs(DBNfit$DAG,DBNmat, struct="trans", b=3)

## End(Not run)

[Package BiDAG version 2.1.4 Index]