Learn R Programming

gRain (version 0.8.3)

extractCPT,extractPOT: Extract conditional probabilities and clique potentials from data

Description

Extract conditional probabilities and clique potentials from data

Usage

extractCPT(x, graph, V = nodes(graph), smooth = 0)
extractPOT(x, graph, smooth = 0)

Arguments

x
A contingency table (an array)
graph
To extractCPT graph is a DAG while to extractPOT graph is an undirected triangulated graph.
V
The set of vertices for which CPTs should be extracted
smooth
See 'details' below

Value

  • extractCPT: A list of conditional probability tables extractPOT: A list of clique potentials

Details

If smooth is non--zero then zero entries of values are replaced with smooth before normalization takes place.

See Also

compileCPT, compilePOT, grain