Learn R Programming

catnet (version 1.00.0)

cnSearchHistCluster: Parent Histogram Matrix - Parallel Version

Description

Estimation of the parent matrix of nodes from data by parallel processing.

Usage

cnSearchHistCluster(data, perturbations, 
	maxParentSet, maxComplexity, 
	parentsPool=NULL, fixedParentsPool=NULL, niter=32, 
	clusterNodes=2, clusterHost="localhost", echo=FALSE)

Arguments

data
a matrix in row-nodes format or a data.frame in column-nodes format
perturbations
a binary matrix with the dimensions of data. A value 1 designates the corresponding node in the sample as perturbed
maxParentSet
an integer, the maximal number of parents per node
maxComplexity
an integer, the maximal network complexity for the search
parentsPool
a list of parent sets to choose from
fixedParentsPool
a list of parent sets to choose from
niter
an integer, the number of single order searches to be performed
clusterNodes
number of processing units to be used
clusterHost
IP address of the cluster host; 'localhost' as default
echo
a boolean that sets on/off some functional progress and debug information

Value

  • A matrix

Details

After performing niter calls of cnSearchOrder for randomly generated node orders (uniformly over the space of all possible node orders), the function returns the histogram matrix of the parent-child relations, as given by cnMatParents function, for the resulting optimal networks. This is essentially the parallel version of cnSearchHist.

See Also

cnMatParents, cnSearchOrder, cnSearchHist

Examples

Run this code
library(snow)
  cnet <- cnRandomCatnet(numnodes=8, maxParents=3, numCategories=2)
  psamples  <- cnSamples(object=cnet, numsamples=100)
  mhisto <- cnSearchHistCluster(data=psamples, perturbations=NULL, 
		maxParentSet=2, maxComplexity=20)
  mhisto

Run the code above in your browser using DataLab