Learn R Programming

catnet (version 1.13.2)

cnFind-method: Find Network by Complexity

Description

This is a model selection routine that finds a network in a set of networks for a given complexity.

Usage

cnFind(object, complexity = 0, alpha=0, factor=1)
 cnFindKL(object, numsamples)

Arguments

object
catNetworkEvaluate or list of catNetworks
complexity
an integer, target complexity
alpha
a character or numeric
factor
a numeric
numsamples
an integer

Value

  • A catNetwork object.

Details

The complexity must be at least the number of nodes of the networks. If no network with the requested complexity exists in the list, then the one with the closest complexity is returned. Alternatively, one can apply some standard model selection with alpha="BIC" and alpha=AIC.

See Also

cnFindAIC, cnFindBIC

Examples

Run this code
cnet <- cnRandomCatnet(numnodes=10, maxParents=2, numCategories=2)
  psamples <- cnSamples(object=cnet, numsamples=100)
  netlist <- cnSearchOrder(data=psamples, maxParentSet=2)
  bnet <- cnFind(object=netlist, complexity=cnComplexity(cnet))
  bnet

Run the code above in your browser using DataLab