Creates the full trylist
For faster learning, a trylist is maintained as a lookup table for a given parent configuration of a node.
maketrylist(initnw,data,prior=jointprior(network(data)),timetrace=FALSE)
initnw |
an object of class |
data |
a data frame used for learning the network, see
|
prior |
a list containing parameter priors, generated by
|
timetrace |
a logical. If |
This procedure is included for illustrative purposes. For each node in the network, all possible parent configurations are created and learned. The result is called a trylist. To create the full trylist is very time-consuming, and a better choice is to maintain a trylist while searching and indeed this is automatically done. The trylist is given as output to all functions that call the learning procedure and can be given as an argument.
A list with one element per node in the network. In the list,
element i is a matrix with two columns: a string with the
indices of the parent nodes, separated by ":", and a numeric with the
log-likelihood contribution of the node given the parent
configuration. Whenever learning is performed of a node given a parent
configuration, the trylist is consulted to yield faster learning,
especially useful when using autosearch
or
heuristic
.
Susanne Gammelgaard Bottcher,
Claus Dethlefsen rpackage.deal@gmail.com.
data(rats) rats.nw <- network(rats) rats.pr <- jointprior(rats.nw,12) rats.nw <- getnetwork(learn(rats.nw,rats,rats.pr)) rats.tr <- maketrylist(rats.nw,rats,rats.pr) rats.hi <- getnetwork(heuristic(rats.nw,rats,rats.pr,trylist=rats.tr))
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.