| 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 |
trueDBN |
an object of class |
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)