Learn R Programming

catnet (version 1.09.4)

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)

Arguments

object
catNetworkEvaluate or list of catNetworks
complexity
an integer, the desired complexity

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.

See Also

cnFindAIC, cnFindBIC

Examples

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

Run the code above in your browser using DataLab