drawnetwork
allows the user to specify a Bayesian network through a point and click interface.drawnetwork(nw,df,prior,trylist=vector("list",size(nw)),
unitscale=20,cexscale=8,
arrowlength=.25,nocalc=FALSE,
yr=c(0,350),xr=yr,...)
network
to be edited.network
.jointprior
.maketrylist
.TRUE
, no learning procedure is called, see eg. rnetwork
.getnetwork
and gettrylist
. The elements arenetwork
with the final network.maketrylist
.banlist
. It is a matrix with two
columns. Each row is the 'from' node index and the 'to' node index,
where the indices are the column number in the data frame.
Note that the network score changes as the network is re-learned
whenever a change is made (unless nocalc
is TRUE
).network
data(rats)
rats.nw <- network(rats)
rats.prior <- jointprior(rats.nw,12)
rats.nw <- getnetwork(learn(rats.nw,rats,rats.prior))
newrat <- getnetwork(drawnetwork(rats.nw,rats,rats.prior))
Run the code above in your browser using DataLab