DBNscore {BiDAG}R Documentation

Calculating the BGe/BDe score of a single DBN


This function calculates the score of a DBN defined by its compact adjacency matrix. Acceptable data matrices are homogeneous with all variables of the same type: continuous, binary or categorical. The BGe score is evaluated in the case of continuous data and the BDe score is evaluated for binary and categorical variables.


DBNscore(scorepar, incidence)



an object of class scoreparameters, containing the data and scoring parameters; see constructor function scoreparameters


a square matrix, representing initial and transitional structure of a DBN; the size of matrix is 2*nsmall+bgn, where nsmall is the number of variables per time slice excluding static nodes and bgn is the number of static variables the matrix entries are in {0,1} such that incidence[i,j] equals 1 if there is a directed edge from node i to node j in the DAG and incidence[i,j] equals 0 otherwise


the log of the BGe or BDe score of the DBN


Polina Suter, Jack Kuipers


testscore<-scoreparameters("bge", DBNdata, DBN=TRUE, dbnpar=list(slices=5, b=3))
DBNscore(testscore, DBNmat)

[Package BiDAG version 2.0.4 Index]