addarrow {deal} | R Documentation |
Create all networks with exactly one arrow added/turned/removed.
addarrow (nw,df,prior,trylist=vector("list",nw$n)) turnarrow (nw,df,prior,trylist=vector("list",nw$n)) removearrow(nw,df,prior,trylist=vector("list",nw$n))
nw |
an object of class network , from which arrows
are added/removed/turned. |
df |
a data frame used for learning the network, see
network . |
prior |
a list describing parameter priors, generated by
jointprior . |
trylist |
a list, used internally for reusing learning of nodes,
see maketrylist . |
Given the starting network, a list of networks is created with exactly
one arrow added/turned/removed. All possible networks (with the
restrictions described in insert
) are returned in
the list of networks. All networks are learned with the data in
df
using the prior information in prior
. The functions
are used by autosearch
.
A list with two elements
nw |
an object of class networkfamily , with all
created networks. All networks have been learned. |
trylist |
an updated list, used internally for reusing learning
of nodes, see maketrylist . |
Susanne Gammelgaard Bøttcher alma@math.auc.dk,
Claus Dethlefsen dethlef@math.auc.dk.
Further information about deal can be found at:
http://www.math.auc.dk/novo/deal.
heuristic
,
autosearch
,
insert
,
addarrows
,
network
,
networkfamily
data(rats) fit <- network(rats) fit.prior <- jointprior(fit,12) fit <- learn(fit,rats,fit.prior)$nw rats.extra <- addarrow(fit,rats,fit.prior)$nw plot(rats.extra) rats.extra2<- addarrow(rats.extra[[2]],rats,fit.prior)$nw plot(rats.extra2) rats.extra3<- turnarrow(rats.extra2[[2]],rats,fit.prior)$nw plot(rats.extra3) rats.extra4<- removearrow(rats.extra2[[2]],rats,fit.prior)$nw plot(rats.extra4)