Learn R Programming

catnet (version 1.08.2)

catNetwork-class: Class "catNetwork"

Description

This is the base class in the catnet package for representing Bayesian networks with categorical values. It stores both the graph and probability structure of categorical Bayesian networks. Technically, catNetwork is a S4 type of R-class implemented in object-oriented style, with slots representing object components and members for accessing and manipulating class objects. Below we list the slots of catNetwork and some of its main members along with the functions for creating catNetwork objects.

Arguments

Objects from the Class

Objects can be created by calls of

cnNew(nodes, cats, parents, probs)

cnRandomCatnet(numnodes, maxParents, numCategories)

cnCatnetFromGraph(gr, cats, probs)

cnCatnetFromSif(file)

Details

The catNetwork class provides a comprehensive general structure for representing discrete Bayesian networks by describing both the graph and probability structures. Although available for direct access, the class components, its slots, should not be manipulated directly but using the class members instead. A catNetwork object integrity can always be checked by calling is(object, "catNetwork").

See Also

cnRandomCatnet, cnCatnetFromGraph, cnNew, cnNodes, cnEdges, cnComplexity, cnPlot

Examples

Run this code
set.seed(123)
  cnet <- cnRandomCatnet(numnodes=10, maxParents=2, numCategories=2)
  cnet

Run the code above in your browser using DataLab