cnRandomCatnet: Random Network

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/def.R

Description

Creates a random catNetwork with specified number of nodes, number of parents and categories per node.

Usage

1
cnRandomCatnet(numnodes, maxpars, numcats, p.delta1=0.01, p.delta2=0.01)

Arguments

numnodes

an integer, the number of nodes

maxpars

an integer, the maximum number of parents per node

numcats

an integer, the number of categories for each node. It is the function limitation to support only constant number of node categories.

p.delta1

a numeric

p.delta2

a numeric

Details

A random set of parents, no more than maxpars, is assigned to each node along with a random conditional probability distribution with values in the union of [p.delta1, 0.5-p.delta2] and [0.5+p.delta2, 1-p.delta1]. Also, each node is assigned a fixed, thus equal, number of categories, numcats.

The function is designed for evaluation and testing purposes only thus lacking much user control over the networks it create. Once created with cnRandomCatnet, a network can be further modified manually node by node. However, this requires direct manipulation of the object's slots and may result in a wrong network object. It is recommended that after any manual manipulation a call is(object, "catNetwork") is performed to check the object's integrity.

Value

A catNetwork object

Author(s)

N. Balov

See Also

cnNew

Examples

1
  cnet <- cnRandomCatnet(numnodes=20, maxpars=3, numcats=2)

sdnet documentation built on May 29, 2017, 1:32 p.m.

Search within the sdnet package
Search all R packages, documentation and source code