plotdiffsDBN {BiDAG}R Documentation

Plotting difference between two DBNs

Description

This function plots an estimated DBN such that the edges which are different to the ground truth DBN are highlighted.

Usage

plotdiffsDBN(
  eDBN,
  trueDBN,
  struct = c("init", "trans"),
  b = 0,
  showcl = TRUE,
  ...
)

Arguments

eDBN

object of class graphNEL (or its adjacency matrix), representing estimated structure (not necessarily acyclic) to be compared to the ground truth graph

trueDBN

object of class graphNEL (or its adjacency matrix), representing the ground truth structure (not necessarily acyclic)

struct

option used to determine if the initial or the transition structure should be plotted; 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

showcl

logical, when TRUE (default) nodes are shown in clusters according to the time slice the belong to

...

optional parameters passed to Rgraphviz plotting functions e.g. main, fontsize

Value

plots the graph highlights differences between 'eDBN' (estimated DBN) and 'trueDBN' (ground truth); edges which are different in 'eDBN' compared to 'trueDBN' are coloured according to the type of a difference: false-positive, false-negative and error in direction.

Author(s)

Polina Suter

Examples

dbnscore<-scoreparameters("bge",DBNdata,
dbnpar = list(samestruct=TRUE, slices=5, b=3),
DBN=TRUE)
## Not run: 
orderDBNfit<-iterativeMCMC(dbnscore,chainout = TRUE, mergetype = "skeleton",scoreout=TRUE,alpha=0.4)
plotdiffsDBN(getDAG(orderDBNfit),DBNmat,struct="trans",b=3)
plotdiffsDBN(getDAG(orderDBNfit),DBNmat,struct="init",b=3)

## End(Not run)

[Package BiDAG version 2.0.4 Index]