cnSearchHist {catnet} | R Documentation |
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.
cnSearchHist(data, perturbations=NULL, maxParentSet=1, parentSizes=NULL, maxComplexity=0, nodeCats=NULL, parentsPool=NULL, fixedParents=NULL, score = "BIC", weight="likelihood", maxIter=32, numThreads=2, echo=FALSE)
data |
a |
perturbations |
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 weihgt
uses multiplier 1. In this case
the entries in the output matrix
show how many times the corresponding parent-child pairs were found.
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
cnet <- cnRandomCatnet(numnodes=8, maxParents=3, numCategories=2) psamples <- cnSamples(object=cnet, numsamples=100) mhisto <- cnSearchHist(data=psamples, perturbations=NULL, maxParentSet=2, maxComplexity=20) mhisto