extractCPT,extractPOT: Extract conditional probabilities and clique potentials from data
Description
Extract conditional probabilities and clique potentials from dataUsage
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.References
S�ren H�jsgaard (2012). Graphical Independence Networks with the
gRain Package for R. Journal of Statistical Software, 46(10), 1-26.
http://www.jstatsoft.org/v46/i10/.