Learn R Programming

catnet (version 1.08.2)

cnProb-method: Conditional Probability Structure

Description

Returns the list of conditional probabilities of nodes specified by which parameter of a catNetwork object. Node probabilities are reported in the following format. First, node name and its parents are given, then a list of probability values corresponding to all combination of parent categories (put in brackets) and node categories. For example, the conditional probability of a node with two parents, such that both the node and its parents have three categories, is given by 27 values, one for each of the 3*3*3 combination.

Usage

cnProb(object, which)

Arguments

object
a catNetwork object
which
a vector of indices

Value

  • A named list of probabilities.

Examples

Run this code
library(catnet)
  cnet <- cnRandomCatnet(numnodes=10, maxParents=3, numCategories=2)
  cnProb(object=cnet)

Run the code above in your browser using DataLab