Estimation of the parent matrix of nodes from data. The frequency of node edges is obtained by fitting networks consistent to randomly generated node orders.
1 2 3 4 5 
data 
a 
pert 
a binary 
maxParentSet 
an 
parentSizes 
an 
maxComplexity 
an 
nodeCats 
a 
parentsPool 
a list of parent sets to choose from 
fixedParents 
a list of parent sets to choose from 
score 
a 
weight 
a 
maxIter 
an 
numThreads 
an 
echo 
a boolean that sets on/off some functional progress and debug information 
The function performs niter
calls of cnSearchOrder
for randomly generated node orders (uniformly over the space of all possible node orders), selects networks according to score
and sum their parent matrices weighted by weight
. Three scoring criteria are currently supported: "BIC", "AIC" and maximum complexity for any other value of score
. The weight
can be
1) "likelihhod", then the parent matrices are multiplied by the network likelihood,
1) "score", then the parent matrices are multiplied by the exponential of the network score,
3) any other value of weight
uses multiplier 1. In this case
the entries in the output matrix
count the presence of the corresponding parentchild pairs.
The function can runs numThreads
number of parallel threads each processing different order.
cnSearchHist
function can be useful for empirical estimation of the relationships in some multivariate categorical data.
A matrix
N. Balov
cnMatParents
, cnSearchOrder
1 2 3 4 5 6  library(sdnet)
cnet < cnRandomCatnet(numnodes=8, maxpars=3, numcats=2)
psamples < cnSamples(object=cnet, numsamples=100)
mhisto < cnSearchHist(data=psamples, pert=NULL,
maxParentSet=2, maxComplexity=100)
mhisto

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.
All documentation is copyright its authors; we didn't write any of that.