cnNodeMarginalProb: Probability Calculations

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

Description

Marginal probability of a node, joint probability of a set of nodes or conditional probability of two sets of nodes.

Usage

1
2
3
cnNodeMarginalProb(object, node)
cnJointProb(object, nodes)
cnCondProb(object, x, y)

Arguments

object

a catNetwork

node

an integer, a node index in object

nodes

a vector of node names or indices in object

x,y

vectors of node categories (either characters or indices) named after nodes of object

Details

cnJointProb returns a matrix with probability values for each combinations of categories arranged in columns. cnCondProb calculates the value of P(X=x|Y=y).

Value

a numerical or numerical matrix

Author(s)

N. Balov

See Also

cnProb

Examples

1
2
3
  cnet <- cnRandomCatnet(numnodes=10, maxpars=3, numcats=2)
  cnNodeMarginalProb(cnet, node=5)
  cnCondProb(cnet, x=c("N1"=1, "N2"=2), y=c("N3"=1, "N4"=2, "N5"=2))

sdnet documentation built on May 2, 2019, 12:43 a.m.